hi all,
I have a script that I am running and part of it inserts some lines into a config file using sed:
This works on one of my ubuntu boxes but not the other and I can't for the life of me work out why! The filesystem permissions look to be the same:Code:sed -i '19 i\ stuff to insert' ./config.yml
working:
not working:Code:$ ls -l | grep config.yml -rwxr-xr-x 1 www-data www-data 3301 2012-04-19 19:00 config.yml
When I run the sed command from the command line I get no error message and the return codes seems to be fine. However, I don't see any stuff in the file:Code:$ ls -l | grep config.yml -rwxr-xr-x 1 www-data www-data 281 2012-04-19 14:02 config.yml
I have even checked to make sure that they are running the same version of sed:Code:$ sed -i '19 i\ stuff to insert' ./config.yml $ echo $? 0 $
working:
not working:Code:$ uname -a Linux q2server 2.6.32-38-generic-pae #83-Ubuntu SMP Wed Jan 4 12:11:13 UTC 2012 i686 GNU/Linux $ sed --version GNU sed version 4.2.1
Any help as always is greatly appreciated!Code:$ uname -a Linux ubuntu 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 i686 GNU/Linux $ sed --version GNU sed version 4.2.1





Adv Reply

Bookmarks