From: jimmy.dillies on
hello,
i have an external script say f which transforms a string into another
e.g.
../f bob
give me bill
i would like to perform f to every first word in a file
idea :
sed 's/[a-z]*/ ./f & /'

how can i do that in practice ?
thanks

From: Ed Morton on
jimmy.dillies(a)gmail.com wrote:

> hello,
> i have an external script say f which transforms a string into another
> e.g.
> ./f bob
> give me bill
> i would like to perform f to every first word in a file
> idea :
> sed 's/[a-z]*/ ./f & /'
>
> how can i do that in practice ?
> thanks
>

One way:

while read first rest
do
echo "`f $first` $rest"
done

Regards,

Ed.
 | 
Pages: 1
Prev: remote ssh
Next: Simple Tea Timer Script