Questions tagged [sh]

sh stands for a shell. It is also often used as extension for a shell script.

212 questions
23
votes
5 answers

/bin/sh source from stdin (from other program) not file

Kind of a tricky one to name this... Basically I have a program which when run prints on STDOUT a set of shell variables: $ ./settings SETTING_ONE="this is setting one" SETTING_TWO="This is the second setting" ANOTHER_SETTING="This is another…
Majenko
  • 32,428
1
vote
2 answers

Easiest way in Bourne shell to extract strings from a line of text?

Let's say I'm doing a grep and it returns this line: Invalid value (48) on line 3 How can I easily pull that value 48 into a variable in Bourne shell?
0
votes
1 answer

sh source permission denied trying to call another script

Can you make a sh script call another script? (Apparently not.) rwb@calleva:~/source$ ls -l total 8 -rwxr--r-- 1 rwb rwb 50 Oct 22 03:38 caller.sh -rwxr--r-- 1 rwb rwb 30 Oct 22 03:36 sourced.sh rwb@calleva:~/source$ cat sourced.sh #!/bin/sh echo…