Use sed instead wc -l to count lines
The output format of `wc -l` differs between implementations, regarding
leading blank spaces. In sed it's always numbers-only.
Aurelio Jargas
10 years ago
2 | 2 | $ curl -O -s -S "$url" # download |
3 | 3 | $ du -h txt2tags-2.6.tgz # verify size |
4 | 4 | 532K txt2tags-2.6.tgz |
5 | $ tar tzf txt2tags-2.6.tgz | wc -l # verify number of files | |
6 | 545 | |
5 | $ tar tzf txt2tags-2.6.tgz | sed -n '$=' # verify number of files | |
6 | 545 | |
7 | 7 | $ tar xzf txt2tags-2.6.tgz # extract |
8 | 8 | $ cd txt2tags-2.6 |
9 | 9 | $ ls -1F # list contents |