OLD | NEW |
---|---|
(Empty) | |
1 #!/bin/sh | |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 # | |
6 # This script executes the command given as the first argument and redirects | |
7 # the command's stdout to the file given as the second argument. | |
stuartmorgan
2012/07/20 07:45:44
Can you expand this comment to explain why having
lliabraa
2012/07/26 19:14:11
Done.
| |
8 # | |
9 # Usage: RedirectStdout.sh <command> <output file> | |
stuartmorgan
2012/07/20 07:45:44
Can you change this from a comment to a real usage
lliabraa
2012/07/26 19:14:11
Done.
| |
10 # | |
11 # Example: Write the text 'foo' to a file called out.txt: | |
12 # RedirectStdout.sh "echo foo" out.txt | |
13 | |
14 exec $1 > $2 | |
stuartmorgan
2012/07/20 07:45:44
We should quote $1 and $2
lliabraa
2012/07/26 19:14:11
Done.
| |
OLD | NEW |