10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I want to replace only the last occurance of "union all" in input file with ";"
I tried with sed 's/union all/;/g' in my input file, it replaced in all lines of input file
Eg:
select column1,column2 from test1 group by 2 union all
select column1,column2 from test2 group by 2 union all
... (9 Replies)
Discussion started by: antosr7
9 Replies
2. Shell Programming and Scripting
I need to extract multiple occurance strings between 2 different patterns in given line.
For e.g. in below as input
-------------------------------------------------------------------------------------
mike(hussey) AND mike(donald) AND mike(ryan) AND mike(johnson)... (8 Replies)
Discussion started by: sameermohite
8 Replies
3. Shell Programming and Scripting
Hi,
I the following sample of out put:
+ 6.07875 10 0 cbr 210 ------- 2 10.0 2.3 1461 19715
- 6.07875 10 0 cbr 210 ------- 2 10.0 2.3 1461 19715
+ 6.07875 22 0 cbr 210 ------- 2 22.0 2.9 1301 19716
- 6.07875 22 0 cbr 210 ------- 2 22.0 2.9 1301 19716
r 6.07922 0 1 cbr 210 ------- 1 30.0... (6 Replies)
Discussion started by: ENG_MOHD
6 Replies
4. Shell Programming and Scripting
Hi,
I have hunted for an answer to this but still can't come up with a working solution.
How do I delete the last of a non unique line
The lines I am looking for is
case "$0" in
esac
This can appear n times I only want the last deleted.
I have tried with sed and... (1 Reply)
Discussion started by: miyoung999
1 Replies
5. Shell Programming and Scripting
How to grep multiple string occurance in input file using single grep command? I have below input file with many IDP, RRBE messages. Out put should have count of each messages.
I have used below command but it is not working
grep -cH "(sent IDP Request)(Recv RRBCSM)" *.txt ... (5 Replies)
Discussion started by: sushmab82
5 Replies
6. UNIX for Dummies Questions & Answers
Hi to all,
I am looking a file in vi editor to get 100th occurance of a latter in that file.
Can any one help me in this?
Thanks
Sathish (1 Reply)
Discussion started by: bsathishmca
1 Replies
7. Shell Programming and Scripting
Hi
I have a file which contains the following two lines which are same But I would like to insert the value=8.8.8.8 in the 1st occurance line and value=9.9.9.9 in the 2nd occurance line.
<parameter name="TestIp1" value="">
<parameter name="TestIp1" value="">
Please suggest (1 Reply)
Discussion started by: madhusmita
1 Replies
8. Shell Programming and Scripting
Hi
I would like to replace specific line eg ExitAction = NONE to ExitAction = FALSE under only TASK sipsiproc and other ExitAction = NONE will remain as usual in the file(shell script)
The file contains:
TASK rgcdproc {
CommandLine = $SSHOME/bin/rgcd.exe
NewConsole... (5 Replies)
Discussion started by: madhusmita
5 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
How can i replace the n'th occurance in a file. ?
I have a property file like
EAR;_TrackingEAR;META-INF/application.xml;xml;context-root;1;valeur
EAR;_TrackingEAR;META-INF/application.xml;xml;context-root;2;valeur2... (2 Replies)
Discussion started by: subin_bala
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I file that has all the status for one day (24hours). Now what I want to do is to count the occurence of a string in its output hourly like for example count occurance of successful or asynchronous clear destinon for every hour and redirect it to file. Please see sample file below. Please... (2 Replies)
Discussion started by: ayhanne
2 Replies