9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
2. Shell Programming and Scripting
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
3. Shell Programming and Scripting
Hello
Take this file...
Test01
Ref test
Version 01
Test02
Ref test
Version 02
Test66
Ref test
Version 66
Test99
Ref test
Version 99
I want to substitute every occurrence of Test{2} with a unique random number, so for example, if I was using sed, substitution would be something... (1 Reply)
Discussion started by: funkman
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a file testarun.txt contains the below lines and i want to print the lines if the character positions 7-8 matches 01.
201401011111
201401022222
201402013333
201402024444
201403015555
201403026666
201404017777
201404028888
201405019999
201405020000
I am trying the... (4 Replies)
Discussion started by: Arunprasad
4 Replies
5. Solaris
I get a file which has all its content in a single row.
The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file.
I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies
6. Shell Programming and Scripting
If I have a file something like as shown below,
ARM*187878*hjhj
BAG*88778*jjjj
COD*7777*kkkk
BAG*87878*kjjhjk
DEF*65656*89989*khjkk
I need the line numbers to be added with a colon when it matches the string "BAG". Here in my case, I need something like
ARM*187878*hjhj... (4 Replies)
Discussion started by: Muthuraj K
4 Replies
7. Shell Programming and Scripting
Hey Fellas.
I am new to scripting. I have searched through the forums and found a lot of good info, but I can't seem to get any of it to work together. I am trying to find a particular sting in a file, and if the next string matches certain criteria, replace it with a string from a csv... (6 Replies)
Discussion started by: midniteslice
6 Replies
8. Shell Programming and Scripting
Hello,
I would like to delete all the footnotes in all my htm files. Hence, I have to delete the whole font tag pairs, i.e. deleting everything between the begin/end font tags.
I create a testfile, of which data parts of all four lines are the same except for the number of font tag pairs,... (3 Replies)
Discussion started by: cibalo
3 Replies
9. Shell Programming and Scripting
Hey guys, I have a file that I've slowly been awking, seding, and greping for data entry. I am down to pull the addresses out to insert them into an excel file. Each address is a few lines, but i want to put a semicolon delimiter in between each address so I can export the text file into excel and... (6 Replies)
Discussion started by: Cocoabean
6 Replies