Get sha1sum checksum onlyPosted: February 11, 2016
The sha1sum utility returns not only SHA-1 checksum, but also the name of the file it was called for. There is no option to disable this.
To discard the file name and keep only the checksum for file /etc/fstab:
sha1sum /etc/fstab | sed 's/ .*//'