hi
From: Ronald Wiplinger [mailto:ronald@2bright.net] I need to extract some info from a text. Unfortunately the text is written as a long paraqraph.
From each paragraph I need a certain string only. In order to get this string easier to catch I would like to prepare the text with sed, wherby I just want to replace a string with a new line
sed s/ertyuiop[................./\<newline>/
output.file does not work.
cat input.file | sed -e "s/ertyuiop\[................./\n/g" > output.file but what you want to do is extracting text, not substituting, so you certainly will need awk :) cat input.file | awk /some typical text/ '{print $3}' will search for lines with "some typical text" in them and print the 3rd word of that line.
How do I want to formulate the sed comand ???
bye
Ronald
regards, stefan