Small help in unix scripting is needed.
I have two strings.
srcFile=/rndlacb/sk70745/compile/ar_cust.pc
GIM_PATH=/rndlacb/sk70745/compile/
I want to cut only the file name from the above string.
Example :
F_Name=ar_cust.pc
Currently i used lengthy steps to achieve this...
lenSrc=`expr length $srcFile`
lenPath=`expr length $GIM_PATH`
lenPath=`expr $lenPath + 2`
fileLen=`expr $lenSrc - $lenPath`
fileLen=`expr $fileLen + 1`
fileName=`expr substr $srcFile $lenPath $fileLen`
Anyone can help me in single or two steps?