sed back referencing
Hi -
Is there a way to back reference things in sed similar to the perl ( ) reference? I'm changing the tiff2pdf bash script. The default output filename is foo.pdf. I'd like it to take the file name of whatever is being fed to the script, remove the tif portion and add .pdf.
For example:
$ tiff2pdf fax0000000001.tif
should output fax0000000001.pdf
Here's what I was thinking it was...but this isn't working
#out=foo.pdf # default output filename
out=`sed 's/(fax[0-9][0-9]*)\.tif/\1\.pdf/'`
Thanks for your help.
pjt
|