On 5/15/20 9:51 PM, Tiago Araujo da costa wrote:
> Good afternoon busybox team.
> 
> Suppose the fruit.txt file has the following content
> 
> $ cat fruit.txt
> watermelon
> melon
> Strawberry
> avocado
> lemon
> orange
> Apple
> 
> If you run the following commands, the results generated will be:
> 
> $ melon=`grep "melon" fruit.txt`
> $ echo "$melon"
> watermelon
> melon

Hi,
the result is:
echo $melon
watermelon melon

> $ echo "$melon" | sed 's /on/an/g;s/$/in/' | rev

echo "$melon" | sed 's /on/an/g;s/$/in/' | rev
sed: -e expression #1, char 18: unterminated `s' command

> ninalemretaw
> nianlem
> 
> If possible, you could generating the C equivalent of the commands mentioned 
> above,
> using the lbb_main function, of the libbusybox.so library?
> 

This would be rather convoluted and impractical, better write a little
C program or a shell script.

Ciao,
Tito
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to