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 Help [/]
Name: vmtrt Date: March 9, 2005 at 11:56:26 Pacific OS: HP UX CPU/Ram: 256 ram
Comment:
Hi, I am trying to update one of my files and am having trouble updating the date. In my file I have: [a.aa] $$start=08/01/2004 $$end=07/31/2005 [a.bb] $$start=07/01/2004 $$end=06/30/2005
Based on aa or bb(within[])I have to update this file on start and end dates. I tried to use
sed "/$1/,/$/s/\$\$$2=.*$/\$\$$2=$3/1" infile where 1=aa or bb, 2 = start or end 3 is the date to be passed. Errors: 1)I am getting the parsing error if i use the date as mm/dd/yyyy, it works for mmddyyyy 2) I am able to change the value for $$end
Name: David Perry Date: March 10, 2005 at 04:48:22 Pacific
Reply:
Consider using a different delimeter character for sed.
sed -e "s,gre,p,"
0
Response Number 2
Name: vmtrt Date: March 10, 2005 at 10:21:36 Pacific
Reply:
How do i change the delimiter character for sed
0
Response Number 3
Name: David Perry Date: March 10, 2005 at 11:49:49 Pacific
Reply:
You can use any character you choose as per the example above. Choose one that does not appear in your string unless you will be escaping the delimeter character.
Summary: I have the sed commands but need help stringing them together correctly. Reading a variable length file where the last line is only ^Z. Need to change the preceding line ending in ^M to ^M^Z. ...
Summary: I'm trying to sed a character out of a series of files. The character is the euro symbol in Windows, 128 on the character map I believe. In vi it's showing up as ^À. I've tried running: sed "s/^À//" f...
Summary: Hi guys, Iam a beginner in awk/sed and need a help on awk/sed. This is my requirement. I have a text file with following entry xx yy zz.txt aa bb cc.txt ee ff gg.txt Iam looking for a program which wi...