Bash Scripts

From In The Wings
Revision as of 16:21, 15 February 2017 by Jka (talk | contribs) (→‎Shell Tricks)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

University of Florida High Performance Computing Center

Shell Tricks

To get the name of the script sans the path: Explanation

SCRIPT=${0##*/}

Tar Tricks

Copy files from one location to another using tar:

tar cf - . | (cd /somewhere ; tar xvfBp -)