10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to check if my file has a line that does not start with '#' and has
1. Listen and 2. 443
echo "Listen 443" > test.out
grep 'Listen *443' test.out | grep -v '#'
Listen 443
The above worked fine but when the entry changes to the below the grep fails... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. Shell Programming and Scripting
I have user1 run a script called logginexpert.sh while has this line of code
sleep 888I then login to another putty session with another user2 and try to grep for the logginexpert.sh process using
ps -ef | grep exSunOS mymac 5.11 11.2 sun4u sparc SUNW,SPARC-Enterprise
But, i dont get any... (20 Replies)
Discussion started by: mohtashims
20 Replies
3. UNIX for Dummies Questions & Answers
I have a file with 2 lines of code
Rome is in Romeo
Romeo is in Rome
How do I grep, so that only last line would be the outcome.
sample output
Romeo is in Rome
I have tried with all possible greps but its resulting in both the lines in output.
Please help. (6 Replies)
Discussion started by: gotamp
6 Replies
4. UNIX for Dummies Questions & Answers
hi all,
i have a data sm thg like this
28504 0 abc 148782859 42 101M nhmmmm ilopo abc 2345432
i want to get only the field which is just aftr abc i,e., 148782859, 2345432
i have used grep /abc\t/ filename to get that but its not working can any 1 help me out (5 Replies)
Discussion started by: anurupa777
5 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to select all files in a directory which are not with .gz extension .
for which I am using below script ,
but its rejecting both .gz and .z extension files,as in each letter is considered separately.
PFB
ls -lrt | awk '{print $9}'| egrep "^IRAMS.*$"
please suggest... (1 Reply)
Discussion started by: Jcpratap
1 Replies
6. Shell Programming and Scripting
Hi All,
We have a shell script(ODS_Load)which loads the data from perticular flat file to oracle table invoking sqlplus based on the parameter.
When we execute the script(ODS_Load) independently, script is working fine and able to load the tables successfully.
We invoke(ODS_Load) with... (1 Reply)
Discussion started by: Nagaraja Akkiva
1 Replies
7. Shell Programming and Scripting
Unable to grep:
Able to grep: (11 Replies)
Discussion started by: proactiveaditya
11 Replies
8. Shell Programming and Scripting
Hi All,
Below is my code,what I am trying to do is redirecting output of ftp to a log file & then greping the errors but here I am unable to grep "Permission denied" error only & also the corresponding log file is also not getting created.
#!/bin/sh
. cfg
USER='abc'
PASSWD='abc123'
... (4 Replies)
Discussion started by: ss_ss
4 Replies
9. Shell Programming and Scripting
Hi, I've trouble getting some numbers from a html-file. The thing is that I have several html-logs that contains lines like this:
nerdnerd, how_old_r_u:45782<br>APPLY: <hour_second> Verification succeded
This is some of what I've extracted from a html file but all I really want is the number... (7 Replies)
Discussion started by: baghera
7 Replies
10. Shell Programming and Scripting
I have the following line in file1
elif ; then
now if i try to grep this using following command
grep -e "elif ; then" file1
it is showing nothing...
how to grep such patterns (2 Replies)
Discussion started by: suri
2 Replies