Summary: Hi Bill, this is easy in sed just sed -n '3p' fileA But it didn't realy delete the rows in fileA just print's the 3 row. So a redirection of the out p...
Summary: Hi Folks, In sed and/or awk, how would I formulate an if/else logic to skip a command if a specific text already exist in a file? I am getting multip...
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 am running a text file through a sequence of sed scripts, but one clean operation escapes me. I want conditionally insert a blank line between *an...
Summary: i have a file where i need to remove text between the delimiters. say... delimiter1 = start_block delmiter2 = no_block so... start_block data.... no_b...
Summary: Yes, your solution pulls line2 into the buffer with line1. With two lines in the buffer, sed can "see" and operate on the embedded newline that separ...
Summary: Yes, that code eliminates empty (null) lines. For each null line encountered, it pulls the next line into the pattern space (main work buffer), then ...
Summary: I have a file where the heading line is duplicated within the file, for example: HEADING 11111 2222222 HEADING 333 I need to delete all occurrences of...
Summary: Please help... I need to delete files in all sub-directories that are more than 10 days old or delete all sub-directoires (entire directory) that's 10...
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: Hi, I have a problem with sed. I have written this command line in my script to replace FII+PI with FII+CI and output to temp.txt sed "s/FII+PI/FII+CI...
Summary: I am using a ksh script to parse/analyze some text files - files that have records that are over multiple lines. I have used sed and awk in the past; ...
Summary: hi... i want to know how can i take away a portion of a file using sed..if i have 100 records in a file , i want to take away 10 records and place it ...
Summary: Hi Folks, Is there a way to insert a string of text in a database list by first locating a specific word and then inserting (or appending) a string ev...
Summary: I do not know what your exact requirements are. Â The following code appends different text to end of line based on what the line starts with: sed \ Â...
Summary: Dear Gurus, How do i delete files in a directory, based on a captured text file listing. E.g. ls {dir} > logfile.log rm {files listed in logfile.log} ...
Summary: i have a directory "ABC" with lots of old files and sub directories in it. the issue now is i want to delete away files which are older than 15 days i...
Summary: HI I have a very large datafile with almost 8 million lines in it and its size is almost 44 Gigs. I have to look for certain lines in that file and i...
Summary: Hi, Anyone know a way to use parameters in a sed or a way round it?? I'm trying to do something like this: sed 's/${USER}/${NEW_USER}/g' but it does n...
Summary: Hi, I wish to replace "white space" pattern in a line of file with "new line". In each line, if a find a white space, i want to put the remaining text...
Summary: I'm using sed.i.e search for pattern and then do the replace. I want to replace 5657 with 10000 in lines which have the pattern /xyz/data. I will be p...