getent shadow shows password hashes for some users
If I execute sudo getent shadow I see password hashes for all the local users who have them. For most of the LDAP accounts I only see * in the password field. However, for a few LDAP users, I see...
View ArticleComment by Dennis Williamson on How can I remove the BOM from a UTF-8 file?
For multiple files: vim -c ":bufdo set nobomb|update" -c "q" *
View ArticleComment by Dennis Williamson on What is the point of the `cd` external command?
"without making any changes on it" - It may update its access time if that option is enabled in the filesystem.
View ArticleComment by Dennis Williamson on How to run Dropbox daemon in background?
This answer ammended by Northstrider's comment should be part of the official documentation provided by Dropbox.
View ArticleAnswer by Dennis Williamson for How to determine the path to a sourced tcsh...
In tcsh, $_ at the beginning of the script will contain the location if the file was sourced and $0 contains it if it was run.#!/bin/tcshset sourced=($_)if ("$sourced" != "") then echo "sourced...
View ArticleComment by Dennis Williamson on Obtain a list of files in Terminal in same...
Note that the sort -V (regardless of the -V) example fails if filenames include newlines. This is what I came up with: find . -print0 | sort -Vz | tr '\0' '\n' which includes the dirname (here ./) in...
View ArticleComment by Dennis Williamson on ls command line-wrap prevention
You can use -E with sed to enable enhanced regex and reduce the number of backslashes.
View ArticleComment by Dennis Williamson on Why is the -e option not in the bash command...
Obligatory see also: BashFAQ/105.
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View ArticleComment by Dennis Williamson on Debian/Ubuntu - Is there a man page listing...
gpg: WARNING: no command supplied. Trying to guess what you mean
View ArticleComment by Dennis Williamson on Execute the output of sed as a bash script...
Note that using g in your sed command will do what you want for commands like docker compose some_file or docker ...; docker ... (or with & or && but will not work as intended for a command...
View ArticleComment by Dennis Williamson on I need to have each line of a file run in a...
This still runs the lines sequentially. Gnu parallel is the best answer, but perhaps backgrounding the lines would work instead of taking the OP's question literally (subshells). eval "$line" &
View ArticleComment by Dennis Williamson on How can I restore my default .bashrc file again?
Why cat instead of cp?
View ArticleComment by Dennis Williamson on How can I restore my default .bashrc file again?
Note that the final slash can be omitted - just use a bare tilde.
View ArticleComment by Dennis Williamson on Does Bourne Shell have a regex validator?
The -P isn't necessary - in fact you should use the flag that corresponds to the flavor of regex you intend to test for - -P is perl, '-E` is extended, for example.
View ArticleComment by Dennis Williamson on How to use argument twice in printf in shell?
/usr/bin/printf and the BSD libc function in MacOS support this. This is fun: /usr/bin/printf '%1$s%0$s' one two (zero is an undefined argument index). It outputs one%1$s%0$stwoone - don't use zero in...
View ArticleComment by Dennis Williamson on What is the point of the `cd` external command?
"without making any changes on it" - It may update its access time if that option is enabled in the filesystem.
View ArticleComment by Dennis Williamson on How can I rebind shortcut for mysql client?...
See here for an alternative.
View Article