Team,
I need unix command to grep directory part from the string
for example I have a texts something like
/apps/opt/data/current/spool/test.dbf
/apps/opt/archive/../../test.dbf
I need only directory part from that string
like my out put will
/apps/opt/data/current/spool/
/apps/opt/archive/../../
echo "/apps/opt/data/current/spool/test.dbf" | awk -F"/" '{ print $NR}'
will display file name. But I need only path