Skip to content

Instantly share code, notes, and snippets.

@dunkfordyce
Created May 26, 2011 23:21
Show Gist options
  • Save dunkfordyce/994338 to your computer and use it in GitHub Desktop.
Save dunkfordyce/994338 to your computer and use it in GitHub Desktop.
// list a directory
{
command: 'ls',
arguments: [
{'uri': '/home/dunk/*.json'}
]
}
// list a directory and grep the returned files for foo
{
command: 'ls',
arguments: [
{'uri': '/home/dunk/*.json'}
],
stdout: {
command: 'grep',
arguments: [
{'regexp': 'foo'}
]
}
}
// list a directory and cp all files to the same name + '.bak'
{
command: 'ls',
arguments: [
{'uri': '/home/dunk/*.json'},
],
stdout: {
command: 'cp',
arguments: [
{'stdin': '.filename'},
{'stdin': {expr: '.filename+".bak"'}}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment