I built a 12 million record file and made a mistake, one field is 1 character too long.
The record is 40 bytes and ends always in 999. I am trying to delete the 37 character in each record. Is this possible without doing a cut and paste. (1 Reply)
Hi All,
I am very new to UNIX...
I was trying to delete ^ from a file and save it with different name...
The version is AIX 5.3
The input file is in this directory /a/b
The Input file name is o9876.out
I want the output file in same path with different name like ABC.txt... (5 Replies)
Please let me know wat would be sed command to delete any partcular line from a file and also moving lines below it to up.
ie wen line #9 is deleted data in line #10 should move to #9 and so on. (2 Replies)
Hi all
I am trying to get my head around doing the following....
I have an input field that could contain either a number a blank field or a whitespace field.
What I want to do is delete a 0 (zero) if it's on its own or leading the number.
So:-
\t0 delete the zero
0 delete the... (8 Replies)
I am not able to analyze the below code..
What I expected is that DELETED will be replaced with the first field in every line.But after giving a try, the output was different.
Can anyone pleas analyze and explain the code in detail?
Many thanks...
$ sed 's/* /DELETED /g' g1.txt > g4.txt... (2 Replies)
I need that a certain part of the content below excluded
==Image Gallery== followed by <gallery> and the content until </gallery>
test SED1
==Image Gallery==
<gallery>
Image:car1.jpg| Car 1<sup>1</sup>
Imagem: car2.jpg| Car2<sup>2</sup>
</gallery> test SED2
==Image... (5 Replies)
I am trying to use sed to delete the ^M at the end of the line and when i pass a file './asciiFix.sh wintest.txt' I get an error saying sed: can't read : no such file or dir. Can someone give me a pointer as to what I am doing wrong?
#!/bin/sh
if file "$@" | grep "with CRLF"; then
echo... (5 Replies)
I am using following sed rule to delete 2 lines after a pattern match inclusive.
# cat /tmp/temp.txt
dns.com
11
22
mydns.com
11
22
dns.com.au
11
22
LAST LINE
# cat /tmp/temp.txt | sed -e '/dns.com/,+2d'
LAST LINE
I just need to remove lines below dns.com only and NOT below... (5 Replies)