The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-10-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,285
man date

You can put it together like
Code:
date +%d #day
date +%b #month, abbrevated
date +%Y #year, 4 digits
To get shell variables into sed, you can just stop sed with ' again, place the variable there, then continue sed with ', like for example
Code:
sed 's/here'${VAR}'something/deleted/g'