Results 1 to 2 of 2
I have a script that copyies a line from one file into another.
But it changes the file format (leaves it wit Ctrl M's at EOeachL)
So I have to ...
- 06-02-2010 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 23
grep converting file form to dos?
I have a script that copyies a line from one file into another.
But it changes the file format (leaves it wit Ctrl M's at EOeachL)
So I have to run dos2unix on the file after!?
Why is this grep command doing this (this file is ok before the grep)Code:mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak cp tg/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0 grep HWADDR /etc/sysconfig/network-scripts/ifcfg-eth0.bak >> /etc/sysconfig/network-scripts/ifcfg-eth0
- 06-07-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Have you tried egrep? Also, what distribution+version of Linux are you running?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote