Summary: ive tried all the possibilties on the sed one liners sites, and tried everything mysefl, but i cant figure it out... ive got a file, containing duplic...
Summary: hi, i need to search for a pattern in files for example the content of the file is below 3555005!K!00630000078!C!20090805235959!47001231000000!1604229...
Summary: For grep, the -v option will negate (or reverse) the result set. grep red grep -v red grep -e red -e blue -e pink grep -ve red -e blue -e pink sed can...
Summary: Anybody know how to get sed to delete lines up to (but not including) a certain line? To delete all up to and including the line, I use 1,/whateve...
Summary: I am guessing that you want to see comment lines in a lot of source files. Different source code has different comment delimiters. I will assume tha...
Summary: How do i delete first line of a file. The file starts with page break ^L. The first line contains the page break ^L. The file may have multiple pagebr...
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: The grep command will filter lines having (or not having) a certain string pattern: grep 56 myfile will output all lines containing that string. grep ...
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: My sed solution for that would be multiple passes and extremely inefficient. awk is much better suited for this. You don't want to do a blind grep fo...
Summary: Hi! As the subject says, I'd like to add a " /" to the end of a line containing a specific keyword. For instance: in.txt: a=1,b=2,c=3 d=4,keyword=5,f=...
Summary: URGENT HELP NEEDED... I need to know how to delete duplicate lines from a pipe delimited file (ksh). it should check only the 1st field for any duplic...
Summary: :g/DATA/s/ [ ]*/CtrlVCtrlM/g For all lines containing the string DATA, the above command will change each string of spaces to a newline character. Th...
Summary: Hi, I am having a problem with grep while using it in a for loop. I have a file "ab" that looks like : (start file) --comment 1 -- comment 2 hghj jh a...
Summary: Hi, I want to delete some blank lines. I used the following command: sed '/^$/d' file_name or sed '/^ *$/d' file_name But both failed to delete ...
Summary: I will address 1a-b-c: 1.a)ps-ef | grep pmon | grep -v grep The bar character is the unix pipe command, and it causes the output of a command to becom...
Summary: Need to parse a file in this way: The file is a multi-line flatfile, containing whitespace separated keywords, ex. one two three four five six seven e...
Summary: hi, I am trying to write a script to delete few lines from the existing files. The requirement is as follows: 1. I need to grep for a pattern "abc" in...
Summary: Hi, I would like to know how to delete the second occurance of a pattern. For example, the pattern is: 1. First line 2. Some other sentence 3. Another...
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: Hello. I am trying to concatenate multiple csv files using cat, and it works. It's just that in every file besides the first one, the first line get...
Summary: When you want to change a pattern and the line may contain two of these patterns one following the other, this would not be a problem if those two bac...
Summary: Is there any way using the korn shell to delete all records in a file except one?? In other words if I had 6 lines in a file, could I issue one comma...