I have the output of a checksum used in a unix shell script, and I need only the checksum value and the filename to be displayed.
$ Cksum path/path2/f1.txt | awk '{print $1,$2}'
1237668 path/path2/f1.txt
However I want the filename without the directory:
1237668 f1.txt
I have tried sed by which I only get the filename and not the checksum:
$ Cksum path/path2/f1.txt | sed 's/.*path2//'
/f1.txt