Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable substition with the Find command

Status
Not open for further replies.

mag01

MIS
Jan 29, 2002
10
GB
Can anyone help with the correct syntax for the following. I want the $yesterday to be resolved to it's value but cannot get the correct syntax (eg quote, double quote etc)

find . -type f -name $YESTERDAY.* -print

Thanks,
Mark.
 
as in a shell script?
have u tried:

find . -type f -name "$YESTERDAY.*" -print

or

find . -type f -name "$YESTERDAY".* -print


I know u said u were playing with single and double quotes, just covering all bases.

___________________________________
[morse]--... ...--[/morse], Eric.
 
The first method works - I was trying that, but on checking after seeing your reply I found that I had the incorrect case for the variable name. Thanks for the fast response.

Mark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top