Quote:
edit out the double pipe " || " only at the end of the line and redirect that info to a new file.
|
redirect
what info to the new file??
What reference do you use for scripting? I strongly recommend "Bash Guide for Beginners"---free at
http://tldp.org
To redirect something to a file, simply put this at the end of the command string: "> newfilename"
There are several ways to grab a specific string, eg:
grep -o string filename ##prints every occurrence of "string"
To get only the text inside the last set of "|"s:
sed -n 's/.*|\(.*\)|$/\1/p' filename
(Actually, this syntax yields what is inside the last pair of "|"s
at the end of the line.) To match something not at the end of the line, some more tweaks are required.