Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
sed bug?
Name: GinoLatino Date: November 19, 2007 at 11:32:42 Pacific OS: sun CPU/Ram: don't know Product: don't know
Comment:
Hi I have a problem using sed when replacing the string into a file.
I use the following command
sed 's/.000//g' $FILE
it seems to work but it replaces also the occurencies like
Name: lankrypt0 Date: November 19, 2007 at 12:39:22 Pacific
Reply:
I assume you are trying to just strip off the period. The example you gave is correct because in sed . is a wildcard that can mean any character. The following should work for you: sed -e 's/\.000//g' $FILE
Summary: sed -n 's/abc/xyz /' /dev/logs/sample.txt After executing the above command, file "sample.txt" does not reflect the updated 'xyz' value in place of 'abc'. Can anyone tell me why ?...
Summary: Greetings... I would be very thankful for any insight into this situation: It seems to me as though a text file I've received does not have a new line character at the end of it. The file is called 1...
Summary: I am trying to change a spacial character after I convert an ebcdic to ascii file. It has trouble with the special character so I need to change it to a ~. I am not sure if this is working properly. C...