Yeah, I feel like a lot of people come up with different solutions for this same problem. What is your command? It's always good to see different options.
As I see now, "status -s" is similar to "status --porcelain".
My comand does not skip first column, so it will try add files "??" or "M" to the new .tar file, it will fail (and show a warning/error) as it will not find them, but it will continue with the other arguments.
Basically it is
tar cvf newFile.tar [list of file names separated with spaces]
DISCLAIMER TO EVERYBODY: my command is dirty and not tested. I dont take any responsability of anyone using it. Learn "tar cvf" and `` before using it :-)
Thanks for sharing, Liz, maybe i will try yours and/or the awk comand. Thanks
Yeah, I feel like a lot of people come up with different solutions for this same problem. What is your command? It's always good to see different options.
As I see now, "status -s" is similar to "status --porcelain".
My comand does not skip first column, so it will try add files "??" or "M" to the new .tar file, it will fail (and show a warning/error) as it will not find them, but it will continue with the other arguments.
Basically it is
tar cvf newFile.tar [list of file names separated with spaces]
DISCLAIMER TO EVERYBODY: my command is dirty and not tested. I dont take any responsability of anyone using it. Learn "tar cvf" and `` before using it :-)
Thanks for sharing, Liz, maybe i will try yours and/or the awk comand. Thanks
Ah I see you. Yes, you can do something similar like this:
git status -s | awk {'print $2'} | xargs -I {} tar -cvf newfile.tar {}
Thanks for sharing!