-
-
Save vvikramjhu/1a13b18fa2150e60bfcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-bash-3.2$ cat rough.py | |
#!/usr/local/bin/python2.7 | |
import subprocess | |
subprocess.check_call(["pwd"]) | |
# subprocess.check_call(["grep", "-o", "entry id", "nvdcve-2.0-2012.xml", "|", "wc", "-w"]) | |
subprocess.check_call(["grep", "-o", "entry id", "nvdcve-2.0-2012.xml", "|", "wc", "-w"]) | |
-bash-3.2$ ./rough.py | |
/home/content/92/7310992/html/safeview_importer/Sat_27_Jun_2015_AM_MST | |
nvdcve-2.0-2012.xml:entry id | |
nvdcve-2.0-2012.xml:entry id | |
nvdcve-2.0-2012.xml:entry id | |
.... | |
..... | |
grep: |: No such file or directory | |
grep: wc: No such file or directory | |
Traceback (most recent call last): | |
File "./rough.py", line 5, in <module> | |
subprocess.check_call(["grep", "-o", "entry id", "nvdcve-2.0-2012.xml", "|", "wc", "-w"]) | |
File "/usr/local/lib/python2.7/subprocess.py", line 511, in check_call | |
raise CalledProcessError(retcode, cmd) | |
subprocess.CalledProcessError: Command '['grep', '-o', 'entry id', 'nvdcve-2.0-2012.xml', '|', 'wc', '-w']' returned non-zero exit status 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment