On Mon, 18 May 1998, John P. Donaldson wrote:

 # This is probably a stupid question but I'm relatively new to this.  I'm

There is no such thing as a stupid question :)

 # I would like to be able to run the macro without having to give it the
 # current date as an argument, I just don't know how to get grep to
 # understand the date command.  This is how I would like it to look:
 # 
 # grep date +"%b/%Y" file1 > file2
 # 
 # How do I enclose the [date +"%b/%Y"] command inside the grep command.  I
 # tried enclosing the date command within ",', {, and [ and none seemed to
 # work. 

You almost have it :)

grep `date +%b/%Y` file1 > file2

The `` ticks say, "run this command and substitute the result RIGHT
THERE" :) [ hows THAT for a non-technical explanation? :) ]

___________________________________________________________________________

 simple is elegant         mrnick.binary9.net         [EMAIL PROTECTED]
___________________________________________________________________________

Reply via email to