2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00

Merge pull request #31 from WebDragon/patch-1

Adding additional usefuls
This commit is contained in:
Igor Chubin 2018-08-28 19:12:41 +02:00 committed by GitHub
commit d7563772e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,3 +45,8 @@ command -v ${program} >/dev/null 2>&1 || error "${program} not installed"
# Please note that 2>&1 goes after
my_command > command-stdout-stderr.txt 2>&1
my_command > /dev/null 2>&1
# Redirect stdout and stderr of cmd1 to cmd2
cmd1 |& cmd2
# Convert spaces to underscores in filenames
for name in *\ *; do mv -vn "$name" "${name// /_}"; done