Bash function to read the lines of a file into an array using the builtin, mapfile.
Posted Over 9 years ago. Visible to the public. Linked content.
- Reads the lines of the specified file into an array. The resulting array is in the dedicated variable,
MAPFILE
. - Skips "commented" lines or portions of lines.
- Skips blank lines.
- Trims leading & trailing spaces in every line.
Related cards:
How to add Feedly as an RSS/ATOM feed reader in Firefox
Create following options/prefs in Firefox (use the next consecutive number following the existing ones, which is '6' in this example):
browser.contentHandlers.types.6.title = Feedly
browser.contentHandlers.types.6.type = application/vnd.m...
CPU Power Management Intel Haswell Chips
These notes are for Intel Haswell desktop chips running Linux. YMMV depending on the specific processor and Linux distro/version.
PowerTOP
([User's Gu...
How to change the default GnuPG version from gpg to gpg2
From the GnuPG manual:
In contrast to the standalone version
gpg
, which is more suited for server and embedded platforms, this version is commonly installed under the name ...
How to make Nemo the default file manager in Ubuntu
This info is from http://www.noobslab.com/2014/02/set-nemo-as-default-file-manager-in.html. It applies to GNOME based desktops.
> xdg-mime default nemo.desktop inode/...
How to suppress ufw log messages in syslog
Follow directions in /etc/rsyslog.d/20-ufw.conf
and add '-'
before "/var/log/ufw.log"
.
After modification, the file should contain the following:
# Log kernel generated UFW log messages to file
:msg,contains,”[UFW ” -/var/log/ufw.log
...
Last edit
Over 9 years ago