Categories
Development Linux

Having trouble summing while loop values with awk

I’m trying to get the sum, 36962, to echo with $TOTAL at the end of the script, but I cannot get it to work. Any advice? This is for a school project and I am pretty rusty with Bash. TOTAL=0 while read p; do awk ‘{ if ($1 > 100 ) print TOTAL+=$1}’ echo $TOTAL […]

Categories
Development HTML Linux

Are there any terminal emulators that can render html?

I think it would be awesome if we could render and also interact with html and javascript in a terminal. The idea is to render buttons and other interactive widgets like file trees in the command line, and being able to interact with them with the mouse. It doesn’t necessarily have to be built on […]

Categories
Development Linux

while read loop and variables

I am seeking your council .. as i’m hitting a wall …. in a bash script I’d like to read all of the lines of a given file to an array, and run a set of statements to determine if said args are true or false . here is the example file id like to […]

Categories
Development Linux

IMAP Fetch request aborts

I’m using Postfix and Dovecot for emails using SMTP and IMAP with my client and server. I’m able to send emails fine using SMTP but when I try retrieving them, IMAP Fetch fails. File “/usr/lib/python2.7/imaplib.py”, line 911, in _command_complete raise self.abort(‘command: %s => %s’ % (name, val)) imaplib.abort: command: FETCH => unexpected response: ‘Return-Path: <threatsource3462@emailcollector.test>’ […]

Categories
Development Linux

What does the parenthesis around a use flag means?

I want to build my curl with the quiche support. I have enabled the use flag in the package.use file, but it does not take effect. I noticed there are a pair of parenthesis around the use flag. What does it mean? [ebuild R ] net-misc/curl-7.66.0::gentoo USE=”http2* ipv6 ldap progress-meter samba ssl threads* -adns -alt-svc […]

Categories
Development Linux

Is my network card bypassing “ignore lid” settings, because download still halts when I close lid?

Summary When I run get-iplayer or youtube-dl at the bash prompt to download a TV program or video, I find that if I close the laptop lid, the download halts. With youtube-dl, after re-opening the lid, it resumes the download after about 1 minute. With get-iplayer, after re-opening the lid, it sometimes doesn’t resume the […]

Categories
Development Linux

In Linux, is it possible to *reserve* swap space for swsusp, while *also* having some swap space for normal use?

My understanding is that suspend-to-swap (swsusp) will fail if there is not enough free space in swap. Is there a way to reserve swap space for swsusp, such that the space will never be used for “normal” swap purposes? I have seen another answer that suggests creating a swap partition, let it mount, and set […]

Categories
Development Linux

piping ls to other programs vs loop globbing

I am reading about the pitfalls of parsing ls and the examples given are about looping ls with for/while. The article title says ‘parsing ls’ – does that mean piping the output of ls to awk and other programs is just as bad? ls /my/path/ | awk ‘{print $NF}’ When piping output of ls to […]

Categories
Development Linux

Delete files and folders recursively in subdirectories

There is a folder, “transfer”. In that transfer folder there are user folders “user1”, “user2”, etc. I want to (periodically) delete the content (i.e. all files and folders in the user folders) but I do not want to delete the “transfer” or user folders. How can I do that using as shell script/command without manually […]

Categories
Development Linux

WPA Supplicant for Wired 802.1x

Our company just recently purchased a QNAP NAS for our Video Edit Suite. The NAS will sit in a small locked rack in the suite and act more or less as a scratch disk with super fast storage. The issue is that the QNAP GUI doesn’t have built in options for 802.1x wire auth in […]