10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
3. 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
4. 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
5. 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
6. Shell Programming and Scripting
Hi Guys,
Req your help in searching and replacing the word that comes after equals(=) symbol
I would like to replace the sting in bold with a string in variable.
d=ABCDF8C44C22
# grep -i NIM_MASTERID ${_NIMINFO}
export NIM_MASTERID=00CDF8C44C00
I'm looking to replace any word that... (4 Replies)
Discussion started by: ajilesh
4 Replies
7. Shell Programming and Scripting
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies
8. Shell Programming and Scripting
Hi all,
I have an gawk script to get user's input, So I use
getline name < "-" (or getline name < "/dev/stdin") in my script
They both work fine when my script deals with files. But it is broken for pipes.
When I try "some command | my awk script", the variable name just gets an empty... (17 Replies)
Discussion started by: qiulang
17 Replies
9. Shell Programming and Scripting
Please Help... I am trying to manipulte the following line
Before :
<user:Account_Password>002786</user:Account_Password>
the password is the "variable", i need to delete / omit the password in the file, (it occurs several thousand times)
so the tag line looks like
After:... (4 Replies)
Discussion started by: jackn7
4 Replies
10. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies