10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
####Solved####
Hello,
My aim is to replace searched string with incremented value under ubuntu 16.04.
Example:
aasasasas 9030 31wwo weopwoep
weerasas 9030 ew31wo ieopwoep
bbqqqsas 9030 ew3swo ieeopwoep
ccsaqpas 9030 ewiro o2opwoep
Expected:
aasasasas 9030 31wwo weopwoep
weerasas 9031... (2 Replies)
Discussion started by: baris35
2 Replies
2. AIX
Hi All,
I have a requirement to replace consecutive occurence of same string nedd to be replaced. Below is the input and desired output.
Input:
---------
123.5|ABC|.|.|.
234.4|DEF|.|.|.|.|.|
Output:
---------
123.5|ABC|||.
234.4|DEF|||||
so basically "|.|" need to be replaced with... (9 Replies)
Discussion started by: ureddy
9 Replies
3. UNIX for Dummies Questions & Answers
hey guys, i have been trying to work this thing out with sed with no luck :confused:
i m looking for a way to replace only the first occurrence after a match
for example :
Cat
Realized what you gotta do
Dog
Realized what you gotta do
Sheep
Realized what you gotta do
Wolf
Realized... (6 Replies)
Discussion started by: boaz733
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Hi,
I have a file with following format
1|" "text " around " |" fire "guest"|" "
2| "xyz"" | "no guest"|"3"
3| """ test3""| "one" guest"|"4"
My requirement is to replace all occurrences of " to ' which are occurring between |" "|delimiter
so my output should look like this
1|"... (3 Replies)
Discussion started by: H_bansal
3 Replies
5. Shell Programming and Scripting
I've a text file with below values viz. multiple rows with same values in column 3, 4 and 5, which need to be considered as duplicates. For all such cases, the rows from second occurrence onwards should be modified in a way that their values in first two columns are replaced with values as in first... (4 Replies)
Discussion started by: asyed
4 Replies
6. Shell Programming and Scripting
I couldn't find the answer anywhere, so I hope you could help me.
I need to change something like the following:
something/bla/aaaa
anything/bbb
to:
something
--bla
----aaaa
anything
--bbb
How do I do this?
Is it possible with sed?
I tried various patterns, but don't know how to... (5 Replies)
Discussion started by: Patwan
5 Replies
7. Shell Programming and Scripting
Ok,
So I have a huge file that has over 12000 lines in it.
in this file, there are 589 occurrences of the string "use five-minute-interval" spread in various areas in the file.
How can i replace the the last 250 of the occurrences of "use five-minute-interval" with "use... (10 Replies)
Discussion started by: SkySmart
10 Replies
8. Shell Programming and Scripting
Lets say I have file.txt:
(Product:Price:QuantityAvailable) (: as delimiter)
Chocolate:5:5
Banana:33:3
I am doing a edit/update function.
I want to change the Quantity Available, so I tried using the SED command to replace 5, but my Price which is also 5 is changed instead.
(for the Banana... (13 Replies)
Discussion started by: andylbh
13 Replies
9. Shell Programming and Scripting
hi all,
I have a text file with following content
PAGENUMBER
asasasa
asasasa
PAGENUMBER
sasasasasa
PAGENUMBER
using sed i want to replace PAGENUMBER by occurrence count
eg
1
asasasa
asasasa
2
sasasasasa
3 (4 Replies)
Discussion started by: uttamhoode
4 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I have a very large; delimited file. In vi I would like to replace:
CSACT_DY;AVG_UEACT1;uesPerActiveLinkSetSize_1;#;A
CSACT_DY;AVG_UEACT2;uesPerActiveLinkSetSize_2;#;A
CSACT_DY;AVG_UEACT3;uesPerActiveLinkSetSize_3;#;A
with:
CSACT_DY;AVG_UEACT1;Average... (7 Replies)
Discussion started by: gilmord
7 Replies