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. UNIX for Beginners Questions & Answers
Hi ,
I have a file as shown below :
1836 21000 01052019 BH90P.TEMP.DA1836.FTP W NULL S
1836 22000 01052019 BH90P.TEMP.DA1836.FTP W 1836/21000 ... (2 Replies)
Discussion started by: krishnaswarnkar
2 Replies
3. Shell Programming and Scripting
Hi,
I am trying to grep a filename from a script after taking the file name and other variables as keyboard input .When I run the grep command with the same filename on the prompt, it runs fine, but it is either not giving me the correct output or not running at all from the script using the... (13 Replies)
Discussion started by: dsid
13 Replies
4. 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
5. 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
6. 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
7. Shell Programming and Scripting
Hi All,
I have the following in a text file
#---- Set Silent License Acceptance
#---- Accept license agreement: remove # sign
#---- example: LICENSE_ACCEPTED=true
#---- if the LICENSE_ACCEPTED is anything other then true the installation will exit
#---- no log... (2 Replies)
Discussion started by: dbashyam
2 Replies
8. Shell Programming and Scripting
Hi,
Can anyone kindly provide some information about how to populate the subject field of the email while using the sendmail utility ? Itried the following command line argument :
echo -e "Body of the email" | /usr/lib/sendmail -f from@from.com -t to@to.com -s " Subject of the email"
... (4 Replies)
Discussion started by: sdiptanil
4 Replies
9. HP-UX
Hi
I am facing the problem where my HP Unix system date is in accordance with the current date but the logs written by the same is of previous time stamp.
Eg. System Date - Thu Mar 15 18:00:04 IST 2007
Syslogs -
Mar 15 12:30:10 mac@1 ftpd: FTP LOGIN FROM xx.xxx.xxx.xx , main
The ftp... (1 Reply)
Discussion started by: PradeepRed
1 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