shell - Unix script how to extract string from a file -
how extract value after 4th slash (/
) /ftp-test/testautoupdate/test/1/x64
?
the extracted result example should 1
awk -f'/' '{print $5}' file kent$ echo "/ftp-test/testautoupdate/test/1/x64"|awk -f'/' '{print $5}' 1
Comments
Post a Comment