What's one single UNIX pipeline that would delete all of the vowels from one file (global)?
I know I would need to use the sed command. But I'm stuck after that. i know how to replace characters with other characters I just don't know how to fully get rid of it.
Try:
tr -d 'aeioiAEIOU' < file
1 Like
Using some sed-fu:
sed 's/[aeiou]//ig' file
To write the changes to the file and create a backup, add the -i switch:
sed -i.BKUP 's/[aeiou]//ig' file
1 Like
That really helps - thanks! I'm just trying to get myself familiar with Unix.
How about if you want to have just one single pipeline that will create a file (let's say x) and we want all the content from another file (we can call it y), one word per line.
For a new problem, please create a new thread on the forum.