10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I just want to match "binutils1_test" only, and print the match line only
lyang001@lyang001-OptiPlex-9010:/tmp$ cat file
zbinutils1_test
bbinutils1_test
binutils1_test
w-binutils1_test
lyang001@lyang001-OptiPlex-9010:/tmp$ cat file |grep -w 'binutils1_test'
... (7 Replies)
Discussion started by: yanglei_fage
7 Replies
2. Shell Programming and Scripting
Hi All,
I am breaking my head in trying to get a command that will exactly match my given string. I have searched net and found few of the options -
grep -F $string file
grep -x $string file
grep "^${string}$" file
awk '/"${string}"/ {print $0}' file
strangely nothing seems to... (3 Replies)
Discussion started by: dips_ag
3 Replies
3. Shell Programming and Scripting
Hi all,
Here is the data file:
- want to match only lan3 in the output .
- not lan3:1
file :
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""... (2 Replies)
Discussion started by: rveri
2 Replies
4. Shell Programming and Scripting
I want to output the records matched with a string like "abcdefg", but with one letter difference at any position.
Can I do this with awk or grep? Thank you! (1 Reply)
Discussion started by: xshang
1 Replies
5. Shell Programming and Scripting
Hi all,
I'm trying to do some work on the authorized_keys file to do a check if there's any information after the hash key.. At the end of the hash key's in the file, there can be an = or ==
Is there a way to check if anything exists after these equals and if so print it out or else print... (2 Replies)
Discussion started by: Jazmania
2 Replies
6. Shell Programming and Scripting
Hi, I want to check out a word in the text file and generate a clear report for me to see...
The text file content:
Content:
............
20120608:
20120608:
............
20120608:
..........
2012031201: , hime]
End of the file
My expected output is:
Full TXT:
manatsu
TXT:... (3 Replies)
Discussion started by: meroko
3 Replies
7. Shell Programming and Scripting
Hello,
Please see below line code:
#!/bin/ksh
set -x
/usr/bin/cat /home/temp |while read line
do
if ]
then
echo "matched"
else
echo "nope"
fi
done
content of filr temp is as below (4 Replies)
Discussion started by: skhichi
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a file like following,
aaabb
aaavv
bbdddaaab
fgdgjhaa
bfd
12352aa
dgs1xaf
sdgsdyg4
How can i get the output below(mask off all the line that have "a") by using vim
#aaabb
#aaavv
#bbdddaaab
#fgdgjhaa
bfd
#12352aa (4 Replies)
Discussion started by: 793589
4 Replies
9. Shell Programming and Scripting
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
Discussion started by: bash_in_my_head
8 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to get one field out of many as follows:
A string of multiple fields separated with "/" characters:
"/ab=12/cd=34/12=ab/34=cd/ef=pick-this.one/gh=blah/ij=something/"
I want to pick up the field "ef=pick-this.one" which has no regular pattern except it starts with "ef=xxxx"... (3 Replies)
Discussion started by: Juha
3 Replies