See ShellPortabilityNotes? for bash(1)/sh(1) portability notes.
tar(1) on BSD systems (including MacOSX) need an explicit dash (-) before the options. (GNU tar doesn't). Eg
$ tar xf file.tar (gnu) $ tar -xf file.tar (bsd)
Not all tars support the -z option for gzip(1) 'ped tar files. Pipe it instead. (Not all environments have the zcat(1) alias either)
$ tar -zxf file.tar.gz # not portable $ gzip -d -c file.tar.gz | tar -xf -
Part of CategoryProgramming
3 pages link to PortabilityNotes: