Skip to content

Commit

Permalink
Some more insitu examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jul 16, 2010
1 parent 0b5bedd commit 2bb2d28
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion programs/insitu.md
Expand Up @@ -22,7 +22,15 @@ contain the output read from the command, followed by the rest of the
original contents of _file_. The part of _file_ overwritten by the
command output will be lost.

Insitu runs the command with `$SHELL -c command`, substituting
With `insitu`, the above would be written as

insitu foo 'grep bar'

Another handy use is to prepend something to an existing file:

insitu foo 'echo whatever; cat'

`Insitu` runs the command with `$SHELL -c command`, substituting
`/bin/sh` for `$SHELL` if the latter is not set.

Download
Expand Down

0 comments on commit 2bb2d28

Please sign in to comment.