Hello,

On 2020-05-20 3:15 p.m., Bertrand Jacquin wrote:
In the fashion of make and git, add the ability for all sum tools to
change directory before reading a file.
[...]
   $ sha256sum -C /etc fstab
   b5d6c0e5e6bc419b134478ad7b3e7c8cc628049876a7772cea469e81e4b0e0e5  fstab

I'm not entirely sure what is the use case,

but GNU "env(1)" already has a '-C/--chdir' option which does
exactly what you want (since version 8.28 / released 2017):

   env -C etc sha256sum fstab

Or the (longer) shell construct:

   (cd etc && sha256sum fstab)



regards,
 - assaf

Reply via email to