Pattern matching in shell script

Hi,

I am using following command to extract string from a file. String will be after last / (slash).

awk -F\ / '{print $NF}' $FILE

but while appending the output in file in script, it dosent work. File created but of zero size... can anyone please help

`awk -F\\\/ '{print $NF}' $FILE` > /tmp/cca

How about ...

$( awk -F '/' '{print $NF}' $FILE ) >> /tmp/cca

You cannot use `` or $() that way. This is used for assignment to a variable...
Just use:

awk -F\/ '{print $NF}' $FILE >> /tmp/cca

yeah.. thanks Scrutinizer !!