echo hello "$( echo hello \ | sed 's,hello,world,g' )"
I use [ exclusively, but with && and ||, instead of -a and -o respectfully.
e.g. [ -e "$file" ] && [ -w "$file" ] instead of [ -e "$file" -a -w "$file" ].
[1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu...
I use [ exclusively, but with && and ||, instead of -a and -o respectfully.
e.g. [ -e "$file" ] && [ -w "$file" ] instead of [ -e "$file" -a -w "$file" ].
[1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu...
[ is an actual binary file that gets invoked, called test. You can "man [" or "man test" to learn about all of its uses.