shell_or_bash_scripts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
shell_or_bash_scripts [2017/05/28 11:48] – skipidar | shell_or_bash_scripts [2022/10/14 06:01] (current) – [Double-Dash in Shell commands] skipidar | ||
---|---|---|---|
Line 10: | Line 10: | ||
|https:// | |https:// | ||
- | |http:// | + | |http:// |
- | |https:// | + | |https:// |
- | |http:// | + | |http:// |
- | |http:// | + | |http:// |
===== Executing or Sourcing the script===== | ===== Executing or Sourcing the script===== | ||
Line 120: | Line 120: | ||
+ | ==== Input from command line ==== | ||
+ | If a command expects **a file** as input - one can pass input from STDOUT instead, | ||
+ | without storing the output to a file first by using following syntax | ||
+ | |||
+ | **oc create -f** expects a file here. | ||
+ | |||
+ | < | ||
+ | oc process -f build/ | ||
+ | oc process -f build/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Double-Dash -- in Shell commands ==== | ||
+ | A double-dash in a shell command signals the end of options and disables further option processing. | ||
+ | https:// | ||
+ | |||
+ | |||
+ | <sxh shell> | ||
+ | # If we use the same approach, we'll receive an error: | ||
+ | # That's because grep treats " | ||
+ | grep " | ||
+ | |||
+ | #works | ||
+ | grep -- --hello data.txt | ||
+ | </ |
shell_or_bash_scripts.1495972120.txt.gz · Last modified: (external edit)