Summary: How to use sed to extract the text I have a text file look like this: /home1/users/usr1/bill.txt /home1/users/usr2/bom.txt /tmp/cost.txt All filenam...
Summary: I want to scan a file using sed and where a condition meets a certain requirement grab the first four characters and insert a new ling plus those four...
Summary: I am trying to extract a number from a string using 'sed'. This works fine on Linux/Unix but when i do the same on windows XP its creating problems. T...
Summary: We have a tilde delimited file with tilde in the character data also. Character data is always in double quotes. For example 1~23~"abc"~1.1~"xy~x" ...
Summary: Hi. I would like to be able to update only one line in a file that matches a key using sed, but I can't seem to get this (the key is right at the begi...
Summary: Hi Guys, Someone help me with this? How to delete all the empty lines... between the lines staring with ABC and XYZ using sed? I tried the following,...
Summary: You can use "sed" to do the Job. Try this sed '$q;s/$/\//g' inputfile > outputfile This will produce the output as (OBJ)/a.o / (OBJ)/b.o / (OBJ)/c.o /...
Summary: Hi all, I've just started to work with shell scripting and sed today. I'm trying to figure out how I can extract data from a file. Basically the file ...
Summary: Hi, I have a file which has lines as follows. /dev/udb/raw305 /dev/udb/raw306 /dev/udb/raw307 Now i want these lines to be edited as DEVICE '/dev/udb/...
Summary: Hi, I have this problem and I wish to know is there an easy way to solve it? I have a file containing in it couples of lines with a specific format (a...
Summary: Hi, I'm trying to do the following :- rsh remote sed "s/ //g" remote_file >> local_file but I get :- sed: command garbled: s/ Now I know that sed "s/...
Summary: I have got a problem to solve. I want to search a string in a paragraph, for that i am using following sed command; sed -e '/./{H;$!d;}' -e 'x;/<se...
Summary: Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu...
Summary: Nails: I tried the code you recommended, but got the same results. I may be wrong, but it looks as though sed will always drop the last line if it do...
Summary: One way is to use sed to delete the line: sed '/^\.\.\.HRD/d' myfile.txt That is, delete a line that starts with 3 periods and string "HRD". ...
Summary: i am using xargs to combine two lines into one. but the lines have double quoted and single quoted strings which i need to retain. how do i go about...
Summary: M, I do not know how to use sed to solve this, but I have another idea. If the "input_file" contains dirty1 dirty2 dirty dirty3 line1 And if you want ...
Summary: Hi I am using sed in a shell script. I am having problems in using parameters in sed for search and replace. TEST=`grep "'/" source | head -1` sed s/...
Summary: I've been wrestling with sed for a while and have been unable to arrive the correct solution to the problem. I have a file containing a large number o...
Summary: Wollie is right; use awk to print the fields you want: awk ' { printf("%s %s\n", $1, $2) } ' myfiles If you insist on using sed, this works, but I sti...
Summary: Hi, The guy before processing the reports and change the format using sed, he use like this: ... cat /usr/local/bin/abcd.sed $i > /tmp/$i ... and I mo...
Summary: Hi, I'm using sed from the command line and need to echo to the screen part of a string. The string is something like 0000000_001_00_006_???????.jar, ...