hi
i have a file as in follwoing:
Now I used the sed command and i see output as in following
sed works fine here. But when I cat "fruit.txt" i dont see the file overwritten by the changes done by sed command. I see only old file which was existing
Please help :mad:
i have a file as in follwoing:
Code:
cat apple.txt
Apple is a fruit
But this fruit is costly
Code:
[root@2 ~]# sed 's/fruit/healthy &/' fruit.txt
Apple is a healthy fruit
But this healthy fruit is costly
[root@2 ~]#
Code:
[root@2 ~]# sed 's/fruit/healthy &/' fruit.txt
Apple is a healthy fruit
But this healthy fruit is costly
[root@2 ~]# cat fruit.txt
Apple is a fruit
But this fruit is costly
[root@2 ~]#