On January 21, 2008 06:26:18 pm Theo v. Werkhoven wrote:
>
> Can be done in different ways, of course.
> With grep and cut:
> grep "bla bla bla" file |cut -d: -f2 >> something
>
> With awk:
> awk -F: '/"bla bla bla"/ {print $2}' file >>something
>
> with Bash:
> OLDIFS=$IFS
> IFS=:
> while read Line;do
>     set -- $Line
>     case $1 in
>         "bla bla bla") echo $2 >>something ;;
>     esac
> done <file
> IFS=$OLDIFS
>
> Theo

Theo, Randall thanks really a lot... grep worked for me, but I also enjoyed 
reading man pages of awk and csplit and trying to figure them out too ;) That 
definitely helps me a lot!

In fact, I customized the code in a way to get the output in a 
more "plottable" way, but even then I'll still need to use these tools to 
work with that!

Thank you very much again!

Sergey

-- 
Sergey Mkrtchyan,
PhD Student @
Department of Physics & Astronomy, 
Faculty of Science, University of Waterloo
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to