3 ms·
> git ls-tree HEAD -r |pn 4|xargs touch What's pn? I've never heard of it, I don't have it, and simple searches don't tell me anything about it. It looks like
by unoti 13y ago
> git ls-tree HEAD -r |pn 4|xargs touch
What's pn? I've never heard of it, I don't have it, and simple searches don't tell me anything about it. It looks like it might be a simple replacement for awk argument parsing, but I'm unsure...
- sciurus 13y agoGood question! Since they have such a comprehensive archive I searched Debian, but it's not there. http://packages.debian.org/search?searchon=contents&keywords=pn&mode=exactfilename&suite=stable&arch=any http://packages.debian.org/search?searchon=contents&keyw...
- emidln 13y agoI think it's along the lines of:: cut -d' ' -F 4 That said, I'd probably try this: git ls-tree HEAD -r | sed 's/[[:space:]]\+/ /g' | cut -d' ' -f 4 Edit: Apparently there is a shorter way of that sed sequence, which brings us to: git ls-tree HEAD -r | tr -s ' ' | cut -d' ' -f 4
- baohaojun 13y agoYes, there is more than one way to do it:-) Had I read the git ls-tree manpage more patiently, I should have wrote: git ls-tree HEAD -r --name-only
- baohaojun 13y agoSorry, and you guessed right, `pn N` is just my shorthand wrapper for `awk '{print $N}'`.