1

This will print the first field of /etc/passwd, which contains all the accounts on a system. awk -F: '{print $1}' /etc/passwd To save that output to a file, use the > file redirection operator, e.g. awk -F: '{print $1}' /etc/passwd > users.txt


1

You can try this. #!/usr/bin/env bash shopt -s extglob nullglob while IFS= read -r -d '' file ; do if [[ $file == *Template.txt && -f $file ]]; then temp="${file%/*}" echo mv -v "$file" "${file%/*}/${temp##*/}.txt" elif [[ $file == *Photos* && -d $file ]]; then Photordir=$file elif [[ $file == *Screenshots* && -d $...


1

I was able to pinpoint the issue further more. It happens only when I'm SSH-ing into a server and it happens only if I hit Ctrl+Z first to interrupt the program. If I use Ctrl+C first, it works; if I use Ctrl+Z and then Ctrl+C, it no longer works (the entire program is no longer getting any input). I guess I'll just leave it like that. Other findings ...


Only top voted, non community-wiki answers of a minimum length are eligible