I have a very basic script that does not return that commands are not received. Ive seen everyone on this site and works for me. Can not find an answer. Bash's path is right I have checked the script with Odi. Ive run dos2unix Nobody helps me with this.
SCRIPT:
#! / Bin / bash HYBRISPROC = 'ps -eo pid, command | Grep [H] ybris | | Grep -v grep | Search for "Awk '{print $ 1}' 'echo' hybrid ..." echo $ HYBRISPROC
results:
./HybrisStopStart.sh: Line 5: ps: command not found. / HybrisStopStart.sh: Line 5: grep: Command not found. / Hybrid.sopstart.sh: Line 5: awk: Command not found. / Hybridzststst.sh: line 5: grep: command not found for hybrid ...
Any ideas? If I run my own command then it works fine. Ive also tried it as sudo and the same result. How about it?
#! / Bin / bash HYBRISPROC = 'ps -eo pid, command | Grep [H] ybris | | Grep -v grep | The search for 'echo' hybrid 'awk' {print $ 1} '' echo '' $ HYBRISPROC "
(OR)
#! / Bin / Bash HYBRISPROC = "ps -eo pid, command | grep [h] ybris | grep -v grep | awk '{print $ 1}'" echo "hybrid search ..." bash -c "$ HYBRISPROC"
(or)
#! / Bin / bash HYBRISPROC = "ps -eo pid, command | grep [h] ybris | grep -v grep | awk '" printing $ 1} "" searching for echo ... "eval" $ HYBRISPROC " / Code> TOTALY: You can see the difference:
#! / Bin / bash ls = `LS-L` countercurrent $ ls #nasty way echo" $ ls "# Good way
Comments
Post a Comment