10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} |
awk 'gsub(/^|abc,|$/,"") {print}'
Required output
{grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies
2. Shell Programming and Scripting
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies
3. Linux
Please help me, wasted hrs:wall:, to find this soulution:-
I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times)
Examples
1. '==='
2. '===='
3. '======='
should be replaced by just '=='
Note :- single character should be replaced. (=... (13 Replies)
Discussion started by: RedRocks!!
13 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
Hi,
Anyone can help me on how to replace the qoutes
inside the pipe | in my Text File like belows;
"AAAA"|"Test "1-A""|"Test AAAA"|"This is A"
"BBBB"|"Test "1-B""|"Test BBBB"|"This is B"
"CCCC"|"My Test C"|"Test "CCCC""|"This is C"
The output I need like belows;
"AAAA"|"Test 1-A"|"Test... (12 Replies)
Discussion started by: fspalero
12 Replies
6. Shell Programming and Scripting
Hi,
I am trying to search a string from a text file which is in between "" (Double Quotes) (Eg: "Unix"), and replace it with a | where ever it is appearing in the text file and save the file.
Please help me.
-kkmdv (6 Replies)
Discussion started by: kkmdv
6 Replies
7. UNIX for Dummies Questions & Answers
Hi ,
I have this file having thousands of records in it . I want to remove every 9 digit number starting with 7 in it . The few lines from the sample file are
"/-GEO-Prizm-Dashes-Covers-Caps-Trim/720000100-200742232-600022761.car"... (8 Replies)
Discussion started by: capri_drm
8 Replies
8. Shell Programming and Scripting
Context:
I am using sed in a cronjob to change the dates in a separate sql script every week. Each week the dates must be updated to reflect the Monday and Friday of the previous week. I have solved the problem but in solving it I discovered a major weakness in my knowledge of sed.
Lines to be... (0 Replies)
Discussion started by: Bubnoff
0 Replies
9. Shell Programming and Scripting
I guess it was getting a little messy on the other post so here goes:
Link to previous post for Question:
https://www.unix.com/shell-programming-scripting/111338-awk-replace-particular-field.html
Continuation of Question
hey i was messing around a bit ... made me wonder...
If the... (1 Reply)
Discussion started by: VGR
1 Replies
10. Shell Programming and Scripting
Hi,
I have a xml text file with the following data, I would like replace F0</Number> to F</Number> only. i used sed to replace, but it not work!! anyone can help?
<Number>11 20 03 22 23 21 91 00 F0</Number>
<Number>12 20 03 20 99 21 91 20 F0</Number>
<Number>10 21 03 21 78 21 92 27... (28 Replies)
Discussion started by: happyv
28 Replies