I have this comand:
sed $((SS - default_scripts))!d customScripts.txt
and it gives me Foo Bar
.
I want to convert this to lowercase.
When I tried using the | awk '{print tolower($0)}'
command on it it returned nothing:
$($(sed $((SS - default_scripts))!d customScripts.txt) | awk '{print tolower($0)}')
Please enlighten me on my typo, or recommend me another POSIX way of converting a whole string to lowercase in a compact manner. Thank you!
The pipe to awk should be inside the same command substitution as sed
, so that it processes the output of sed
.
$(sed $((SS - default_scripts))!d customScripts.txt | awk '{print tolower($0)}')
You don't need another command substitution around both of them.