10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Facing issues in grepping only the IP Address from a file i have tried the below and it was of not much help
awk -F"" '/(/ { print $3 }'
awk -F"</*(>" '/ip/ { print $2 }'
grep "ip" file1|cut -f2 -d"<"|cut -f2 -d">"
grep "(" file1 |cut -f2 -d"<"|cut -f2 -d">"
grep -e... (9 Replies)
Discussion started by: satishcarya
9 Replies
2. Shell Programming and Scripting
Hello Everyone,
I have a file sam1 with the below content
SYSYSID;MANDT;/SIE/AD_Z0M_INDX;/SIE/AD_Z0M_KEY1
echo $Regex
\bSYSYSID\b|\bMANDT\b|\b/SIE/AD_Z0M_INDX\b|\b/SIE/AD_Z0M_KEY1\b
cat sam1 | grep -Eo $Regex
I expect the result as
SYSYSID
MANDT
/SIE/AD_Z0M_INDX
/SIE/AD_Z0M_KEY1... (4 Replies)
Discussion started by: sam99
4 Replies
3. Shell Programming and Scripting
I have an input file:
class 1 3 5 10.10.10..0/23 hicks jimmy
class 3 10.12.10.0/22 mike
class.019283 10.10.15.10/20 henry
gym.847585 45 192.168.10.0/22 nancy jim steve maya
The output should look like this:
10.10.10..0/23
10.12.10.0/22
10.10.15.10/20
192.168.10.0/22
I have the... (3 Replies)
Discussion started by: e_mikey_2000
3 Replies
4. UNIX for Dummies Questions & Answers
I have a file with a lot of IP addresses in it named "address.list".
address.list looks something like this:
10.77.50.11
10.77.50.110
10.77.50.111
a bunch more addresses
For every IP address I need to grep another file to see if the IP address is in the other file:
for x in `cat... (5 Replies)
Discussion started by: squoggle
5 Replies
5. Shell Programming and Scripting
I have a file
$ cat ip12
11.22.33.44
192.68.1.2
helo
l
72.34.34.200
333.444.555.666
12.23e.544.423
myip1 11.22.33.44
myip2 33.44.55.66 #fine this IP should also be listed
I do
$ cat ip12 | grep '^\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}$'
11.22.33.44
192.68.1.2 (2 Replies)
Discussion started by: anil510
2 Replies
6. Shell Programming and Scripting
I am trying to add some code to the begging of a script so that it will remove all the .transcript files, when their is no coressponding .wav file. But it doesnt work.
This is the code I have added:
for transcriptfile in `$voicemaildir/*.transcript`; do
wavfile=`echo $transcriptfile | cut -d'.'... (2 Replies)
Discussion started by: ghurty
2 Replies
7. Shell Programming and Scripting
Hi
I have downloaded a HTM file from the web.
What I want to do is perform a grep search of that file, searching for all strings where 'http' is present within the file, but only contains the word 'cache' within the string.
I've includeda sample file, which I'm trying to extract the above... (5 Replies)
Discussion started by: colmbell
5 Replies
8. Shell Programming and Scripting
Guys, I have my.mrk file as follows:
rs112
rs105
rs154
rs136
...
and my.map file:
7 rs112 0.59
7 rs188 0.63
7 rs105 0.77
7 rs113 0.84
7 rs154 0.92
7 rs111 1.46
7 rs095 1.71 (3 Replies)
Discussion started by: Zoho
3 Replies
9. Shell Programming and Scripting
I am using Ubuntu linux desktop, and I am trying to schedule a sheel script to run every 10minutes.
These are the steps I have taken:
crontab -e
added and saved this line to the file
# m h dom mon dow command
*/1 * * * * /home/enzo/Desktop/dlrecentuse
restarted cron:
sudo... (5 Replies)
Discussion started by: daydreamer
5 Replies
10. Shell Programming and Scripting
I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool).
But I would like to know why passwd command isnt working in scripts? (1 Reply)
Discussion started by: Deepa
1 Replies