Hi,
I would like to search between "aaa" and ";" for "ccc ddd" and replace it with a blank. To me, each "line" of interest begins with "aaa" and ends with a semicolon ";".
For example,
aaa 111 222 ccc ddd;
sdfs fdd ccc ddd;
sfsdf dfdf fdf dfff
dfsdfs fdfd;
aaa dfg ccc ccc ddd;
aaa ddd ccc ccc...
Hi,
I have a file looks like this:
aaa bbb ccc ddd;
123 321 423 444;
aaa eee ccc ddd;
aaa fff ccc ddd;
12243455465467;
I want the output to look like this:
aaa bbb;
123 321 423 444;
aaa eee;
aaa fff;
12243455465467;
Basically, just remove the last 2 entries of the lines begin with "aaa" but...
Hi,
I have a file that looks like this:
textxxxxxx abc 100 200
text again.....300 100
more text......
(5853.2775,2960.825)
(5853.275, 2960.82) (5853.28, 2960.83)
(6185.3225,6330.975)
(6185.32, 6330.97) (6185.325, 6330.98)
I would like to add 10 to the numbers of...
Hi,
I have a file that looks like this:
line1 - This is line #1
line1 - This is line #1
11 11 11
500 600
600 700
700 800
line7 - This is line #7
line8 - This is line #8
I would like to subtract 10 ONLY from the lines with 2 numerical columns. Meaning it should look like this:
line1 - This is...
Hi,
I have a file that looks like this:
Par1
sdfsdff c 568768
dfdfdfdty6v 655
dfdsdfd 1243
END1abcd
Par2
tyrtyrfghgfh
rtytrfg gffg
gfhjkk dffg
END2abcd
I would like to write a TCL script to split what's between Par and END into seperate files. For example,
::File Par1.txt::
Par1
sdfsdff c...
Hi guys,
I would like to print the line before and the line after "JohnDoe" is found. For example,
===Input text file===
line1
line2
JohnDoe blah blah blah
line4
line5
===Desired output file===
line2
line4
Can someone suggest a good way of doing this?
Thanks in advance for any help. What I want...
Input file:
John line1
John line2
John line3
Mary line4
Mary line5
Walter line6
Jack line7
Jack line8
Output file:
John line1
line2
line3
Mary line4
line5
Walter line6
Jack line7
line8
Keep everything in $2 the same. Only...
I have fileA consists of keywords:
aaa
bbb
ccc
And fileB consists of fulldata
I would like to the lines in fileB that contains any of the fileA keywords. For example,
line1 sdfffffffff
line2 sdfaaaaaaaa
line3 sdfghhrwwww
The output should be
line1 sdfffffffff
line3 sdfghhrwwww
Please help...
Hi,
I have a script that does substituion with s command.
eg:
#!/bin/sed -f
s/regexp/replacement/
so at Unix/Linux prompt,
%>./script original_file >new_file
It works like a charm but I also need to add strings/texts to the new_file. How do I do it in the same script?
Please help.
I have a file which contains one name in each line. I would like to cat/echo all the names to one single line. How do I do that?
For example,
From:
ALAN
ALEX
BEN
To:
ALAN ALEX BEN
Please help. Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.