Solved

shell script ---- how to

Posted on 2004-10-07
2
245 Views
Last Modified: 2010-04-21
I have a command that i need to put in a shell script and then run a cron job with it.


Have a problem with one command.

grep  'multiple LDAP matches' PopProxy_20041007.log


this log file creates a new log file each day but has new name with new date.

Ex:


day one:    PopProxy_20041007.log    then
next day:   PopProxy_20041008.log



how can i make this command  grep  'multiple LDAP matches' PopProxy_20041007.log
to pick up the file that i need it to grep from?


Thanks,
0
Comment
Question by:bt707
2 Comments
 
LVL 20

Accepted Solution

by:
tfewster earned 500 total points
ID: 12250224
grep  'multiple LDAP matches' PopProxy_`date +%Y%m%d`.log
0
 

Author Comment

by:bt707
ID: 12250483
thanks that did it,

Thanks again!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now