Skip to content

Instantly share code, notes, and snippets.

@itayd
Created November 23, 2010 15:40
Show Gist options
  • Save itayd/711952 to your computer and use it in GitHub Desktop.
Save itayd/711952 to your computer and use it in GitHub Desktop.
flips second and rest of arguments for a command
#!/bin/sh
first=$1
second=$2
shift 2
after=$*
exec $first $after $second
@itayd
Copy link
Author

itayd commented Nov 23, 2010

example:
flip.sh scp [email protected]:/ bla
executes scp bla [email protected]:/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment