10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is my first post in this forum.
I want to do is match form feed lines one by one in a file and delete the next n lines (ex-3 lines) with the form feed character
Eg - Files looks like
Hdr3 (9 Replies)
Discussion started by: yohan
2. Shell Programming and Scripting
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
I want it to look like: (6 Replies)
Discussion started by: slimjbe
3. Shell Programming and Scripting
ServerName yuvraj.com... (5 Replies)
Discussion started by: tkmmelvin
4. Shell Programming and Scripting
Hello everyone I'm doing a program in bash and wanted to know how can I do to delete document lines the words not ending in S with SED, ie, show only those ending with the letter S.
I probe with:
sed -e /$.*/d "$file" | more
to delete all lines NOT ending in S but not work!... (3 Replies)
Discussion started by: adiegorpc
5. Shell Programming and Scripting
I have one /etc/hosts.equiv file which has following entries
I am trying to delete lines starting from wcars42b.... (1 Reply)
Discussion started by: akash_mahakode
6. Shell Programming and Scripting
First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible )
I got a file (trace file to recreate the control file from oracle for the dba boys)
another line... (11 Replies)
Discussion started by: plelie2
7. Shell Programming and Scripting
I have a text file with blank lines fullfilled with spaces and others only containing the "Enter" caracter, the \012.
I would like to eliminate all them with the sed command.
Is it possible?
making: sed '/^$/d' <file should delete the blank lines but doesn't work for the lines that only... (2 Replies)
Discussion started by: tmxps
8. Shell Programming and Scripting
I have bunch of files containing lines of text that surrounding by <# .......#> tags
I like to delete this lines from the text files whiteout open the files , can it be done with sed ?
or other unix tool (perl mybe )? (2 Replies)
Discussion started by: umen
9. Shell Programming and Scripting
I have been reading through the sed one liners, trying to understand what is happening.
# delete the last 2 lines of a file
The above will delete the last 2 line of a file. I tried analyzing what happens. And I got lost :(
This is what I understood so far from the... (2 Replies)
Discussion started by: vino
10. Shell Programming and Scripting
I am trying to figure out the syntx to delete multiple lines w/ sed. I know the following syntax will delete lines 1 THROUGH 5 from filex:
sed 1,5d filex
But I wan to delete lines 1 AND 5 (keeping lines 2,3, and 4). Does anyone know how to do this in a single sed statement?
... (2 Replies)
Discussion started by: bookoo