I am on a MacOS machine (I think tar command is BSD).
From I have read the
-s switch on BSD tar, is the same thing as the
--transform switch for GNU tar.
I have this command:
tar -zcf foo.tgz -s /^"$(pwd)"/"$(pwd)/package"/ "$(pwd)"
what I am trying to do is archive everything into a file called foo.tgz, and put everything into a subdirectory called "package".
I get this error:
tar: Invalid replacement flag a
I believe what's past to the -s option is not correct, but not sure what it might be.
Ultimately, I am looking to write the output to stdout, not to a file called foo.tgz, so if you feel like updating that too, please do, thanks.