bourne shell if [ -e $directory/file.$suffix ] Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionHow can I use bash's if test and find commands together?Arrays in Unix Bourne ShellBourne shell: trailing `-` operator in parameter substitutionBourne shell: ignoring certain kinds of stdinBourne Shell to CShellIs it possible to put an if statement within an If statements like so?Bourne shell: what does it execute on interactive, non-login?launching bourne shell script with $USR envSet comparator with variables within a variable, then have shell expand those variables each time it's echo'dWhy does `xargs -n ` on SmartOS (SunOS) behave differently than other implementations?
Direct Experience of Meditation
Can a monk deflect thrown melee weapons?
Are my PIs rude or am I just being too sensitive?
New Order #5: where Fibonacci and Beatty meet at Wythoff
When is phishing education going too far?
What computer would be fastest for Mathematica Home Edition?
Autumning in love
Can the prologue be the backstory of your main character?
Single author papers against my advisor's will?
Problem when applying foreach loop
Can a zero nonce be safely used with AES-GCM if the key is random and never used again?
How to say that you spent the night with someone, you were only sleeping and nothing else?
What do you call the holes in a flute?
How is simplicity better than precision and clarity in prose?
Two different pronunciation of "понял"
Can smartphones with the same camera sensor have different image quality?
Should you tell Jews they are breaking a commandment?
How do I keep my slimes from escaping their pens?
Classification of bundles, Postnikov towers, obstruction theory, local coefficients
Active filter with series inductor and resistor - do these exist?
Was credit for the black hole image misattributed?
Why does tar appear to skip file contents when output file is /dev/null?
What can I do if my MacBook isn’t charging but already ran out?
Did the new image of black hole confirm the general theory of relativity?
bourne shell if [ -e $directory/file.$suffix ]
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionHow can I use bash's if test and find commands together?Arrays in Unix Bourne ShellBourne shell: trailing `-` operator in parameter substitutionBourne shell: ignoring certain kinds of stdinBourne Shell to CShellIs it possible to put an if statement within an If statements like so?Bourne shell: what does it execute on interactive, non-login?launching bourne shell script with $USR envSet comparator with variables within a variable, then have shell expand those variables each time it's echo'dWhy does `xargs -n ` on SmartOS (SunOS) behave differently than other implementations?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
#!/bin/sh
CONFIG_DIR="/var/opt/SUNWldm/"
read option
if [ $option -eq 9 ]; then
ret=1
elif [ -e $CONFIG_DIRfile.xml.$option ]; then
echo "TRUE"
fi
I have the above code in a while loop to present a list of options. Unfortunately I'm having problems with the elfi
statement.
From: IF for Beginners the -e returns true if the file exists.
I've double checked the syntax and even running the script in debug mode (I put set -x
at the beginning of this script and could see that the replacement in the if
is done properly as seen inline:
+ [ 201301271355 -eq 9 ]
+ [ -e /var/opt/SUNWldm/file.xml.201301271355 ]
./ldm_recover.sh: test: argument expected
I've been searching so far and haven't found a reason for failing, any ideas what I'm doing wrong?
shell solaris test bourne-shell
add a comment |
#!/bin/sh
CONFIG_DIR="/var/opt/SUNWldm/"
read option
if [ $option -eq 9 ]; then
ret=1
elif [ -e $CONFIG_DIRfile.xml.$option ]; then
echo "TRUE"
fi
I have the above code in a while loop to present a list of options. Unfortunately I'm having problems with the elfi
statement.
From: IF for Beginners the -e returns true if the file exists.
I've double checked the syntax and even running the script in debug mode (I put set -x
at the beginning of this script and could see that the replacement in the if
is done properly as seen inline:
+ [ 201301271355 -eq 9 ]
+ [ -e /var/opt/SUNWldm/file.xml.201301271355 ]
./ldm_recover.sh: test: argument expected
I've been searching so far and haven't found a reason for failing, any ideas what I'm doing wrong?
shell solaris test bourne-shell
On Solaris, don't use/bin/sh
, use/usr/xpg4/bin/sh
to get a standard shell./bin/sh
is only for backward compatibility for old scripts that rely on/bin/sh
being a Bourne shell and not a standardsh
.
– Stéphane Chazelas
Jan 28 '13 at 12:10
I need to maintain what is already previously being use and that sticks me to /bin/sh or perl.
– BitsOfNix
Jan 29 '13 at 7:31
add a comment |
#!/bin/sh
CONFIG_DIR="/var/opt/SUNWldm/"
read option
if [ $option -eq 9 ]; then
ret=1
elif [ -e $CONFIG_DIRfile.xml.$option ]; then
echo "TRUE"
fi
I have the above code in a while loop to present a list of options. Unfortunately I'm having problems with the elfi
statement.
From: IF for Beginners the -e returns true if the file exists.
I've double checked the syntax and even running the script in debug mode (I put set -x
at the beginning of this script and could see that the replacement in the if
is done properly as seen inline:
+ [ 201301271355 -eq 9 ]
+ [ -e /var/opt/SUNWldm/file.xml.201301271355 ]
./ldm_recover.sh: test: argument expected
I've been searching so far and haven't found a reason for failing, any ideas what I'm doing wrong?
shell solaris test bourne-shell
#!/bin/sh
CONFIG_DIR="/var/opt/SUNWldm/"
read option
if [ $option -eq 9 ]; then
ret=1
elif [ -e $CONFIG_DIRfile.xml.$option ]; then
echo "TRUE"
fi
I have the above code in a while loop to present a list of options. Unfortunately I'm having problems with the elfi
statement.
From: IF for Beginners the -e returns true if the file exists.
I've double checked the syntax and even running the script in debug mode (I put set -x
at the beginning of this script and could see that the replacement in the if
is done properly as seen inline:
+ [ 201301271355 -eq 9 ]
+ [ -e /var/opt/SUNWldm/file.xml.201301271355 ]
./ldm_recover.sh: test: argument expected
I've been searching so far and haven't found a reason for failing, any ideas what I'm doing wrong?
shell solaris test bourne-shell
shell solaris test bourne-shell
edited 17 hours ago
Rui F Ribeiro
42.1k1483142
42.1k1483142
asked Jan 28 '13 at 8:25
BitsOfNixBitsOfNix
4,21821832
4,21821832
On Solaris, don't use/bin/sh
, use/usr/xpg4/bin/sh
to get a standard shell./bin/sh
is only for backward compatibility for old scripts that rely on/bin/sh
being a Bourne shell and not a standardsh
.
– Stéphane Chazelas
Jan 28 '13 at 12:10
I need to maintain what is already previously being use and that sticks me to /bin/sh or perl.
– BitsOfNix
Jan 29 '13 at 7:31
add a comment |
On Solaris, don't use/bin/sh
, use/usr/xpg4/bin/sh
to get a standard shell./bin/sh
is only for backward compatibility for old scripts that rely on/bin/sh
being a Bourne shell and not a standardsh
.
– Stéphane Chazelas
Jan 28 '13 at 12:10
I need to maintain what is already previously being use and that sticks me to /bin/sh or perl.
– BitsOfNix
Jan 29 '13 at 7:31
On Solaris, don't use
/bin/sh
, use /usr/xpg4/bin/sh
to get a standard shell. /bin/sh
is only for backward compatibility for old scripts that rely on /bin/sh
being a Bourne shell and not a standard sh
.– Stéphane Chazelas
Jan 28 '13 at 12:10
On Solaris, don't use
/bin/sh
, use /usr/xpg4/bin/sh
to get a standard shell. /bin/sh
is only for backward compatibility for old scripts that rely on /bin/sh
being a Bourne shell and not a standard sh
.– Stéphane Chazelas
Jan 28 '13 at 12:10
I need to maintain what is already previously being use and that sticks me to /bin/sh or perl.
– BitsOfNix
Jan 29 '13 at 7:31
I need to maintain what is already previously being use and that sticks me to /bin/sh or perl.
– BitsOfNix
Jan 29 '13 at 7:31
add a comment |
2 Answers
2
active
oldest
votes
The Bourne shell is somewhat of an antique. The Solaris version doesn't have the -e
operator for the test
(a.k.a. [
) builtin that was introduced somewhat late in the life of the Bourne shell¹ and enshrined by POSIX.
As a workaround, you can use -f
to test for the existence of a regular file, or -r
if you aren't interested in unreadable files.
Better, change #!/bin/sh
to #!/usr/xpg4/bin/sh
or #!/bin/ksh
so as to get a POSIX shell.
Beware that [ $option -eq 9 ]
is probably not right: -eq
is a numerical comparison operator, but $option
isn't really numeric — it's a date. On a 32-bit machine, when 201301271355
is interpreted as a number, it is taken modulo 232. It so happens that no date in the 21st century is very close to 0 modulo 232, but relying on this is very brittle. Make this [ "$option" = 9 ]
instead.
As a general shell programming principle, always put double quotes around variable and command substitutions: "$foo"
, "$(foo)"
. If you don't, the shell splits the result at each whitespace character and treats each resulting word as a filename wildcard pattern. So an unprotected $foo
is only safe if the value of foo
does not contain any whitespace or [?*
. Play it safe and always use double quotes (unless you intend the splitting and pattern matching to happen).
¹ Or was it a ksh addition never ported to Bourne? I'm not sure.
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
add a comment |
Well this was easier than I though:
It seems that the -e
operator for the if
is not defined in bourne shell (sh) but only in bourne again shell (bash).
I replaced the if [ -e ...
by if [ -r ...
and it's working.
The standard test command supports the-e
flag, and that command is what standardsh
should support. Your answer is not correct forsh
in general, but only very old nonstandardsh
s on Solaris.
– kojiro
Jan 29 '13 at 0:40
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f62811%2fbourne-shell-if-e-directory-file-suffix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The Bourne shell is somewhat of an antique. The Solaris version doesn't have the -e
operator for the test
(a.k.a. [
) builtin that was introduced somewhat late in the life of the Bourne shell¹ and enshrined by POSIX.
As a workaround, you can use -f
to test for the existence of a regular file, or -r
if you aren't interested in unreadable files.
Better, change #!/bin/sh
to #!/usr/xpg4/bin/sh
or #!/bin/ksh
so as to get a POSIX shell.
Beware that [ $option -eq 9 ]
is probably not right: -eq
is a numerical comparison operator, but $option
isn't really numeric — it's a date. On a 32-bit machine, when 201301271355
is interpreted as a number, it is taken modulo 232. It so happens that no date in the 21st century is very close to 0 modulo 232, but relying on this is very brittle. Make this [ "$option" = 9 ]
instead.
As a general shell programming principle, always put double quotes around variable and command substitutions: "$foo"
, "$(foo)"
. If you don't, the shell splits the result at each whitespace character and treats each resulting word as a filename wildcard pattern. So an unprotected $foo
is only safe if the value of foo
does not contain any whitespace or [?*
. Play it safe and always use double quotes (unless you intend the splitting and pattern matching to happen).
¹ Or was it a ksh addition never ported to Bourne? I'm not sure.
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
add a comment |
The Bourne shell is somewhat of an antique. The Solaris version doesn't have the -e
operator for the test
(a.k.a. [
) builtin that was introduced somewhat late in the life of the Bourne shell¹ and enshrined by POSIX.
As a workaround, you can use -f
to test for the existence of a regular file, or -r
if you aren't interested in unreadable files.
Better, change #!/bin/sh
to #!/usr/xpg4/bin/sh
or #!/bin/ksh
so as to get a POSIX shell.
Beware that [ $option -eq 9 ]
is probably not right: -eq
is a numerical comparison operator, but $option
isn't really numeric — it's a date. On a 32-bit machine, when 201301271355
is interpreted as a number, it is taken modulo 232. It so happens that no date in the 21st century is very close to 0 modulo 232, but relying on this is very brittle. Make this [ "$option" = 9 ]
instead.
As a general shell programming principle, always put double quotes around variable and command substitutions: "$foo"
, "$(foo)"
. If you don't, the shell splits the result at each whitespace character and treats each resulting word as a filename wildcard pattern. So an unprotected $foo
is only safe if the value of foo
does not contain any whitespace or [?*
. Play it safe and always use double quotes (unless you intend the splitting and pattern matching to happen).
¹ Or was it a ksh addition never ported to Bourne? I'm not sure.
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
add a comment |
The Bourne shell is somewhat of an antique. The Solaris version doesn't have the -e
operator for the test
(a.k.a. [
) builtin that was introduced somewhat late in the life of the Bourne shell¹ and enshrined by POSIX.
As a workaround, you can use -f
to test for the existence of a regular file, or -r
if you aren't interested in unreadable files.
Better, change #!/bin/sh
to #!/usr/xpg4/bin/sh
or #!/bin/ksh
so as to get a POSIX shell.
Beware that [ $option -eq 9 ]
is probably not right: -eq
is a numerical comparison operator, but $option
isn't really numeric — it's a date. On a 32-bit machine, when 201301271355
is interpreted as a number, it is taken modulo 232. It so happens that no date in the 21st century is very close to 0 modulo 232, but relying on this is very brittle. Make this [ "$option" = 9 ]
instead.
As a general shell programming principle, always put double quotes around variable and command substitutions: "$foo"
, "$(foo)"
. If you don't, the shell splits the result at each whitespace character and treats each resulting word as a filename wildcard pattern. So an unprotected $foo
is only safe if the value of foo
does not contain any whitespace or [?*
. Play it safe and always use double quotes (unless you intend the splitting and pattern matching to happen).
¹ Or was it a ksh addition never ported to Bourne? I'm not sure.
The Bourne shell is somewhat of an antique. The Solaris version doesn't have the -e
operator for the test
(a.k.a. [
) builtin that was introduced somewhat late in the life of the Bourne shell¹ and enshrined by POSIX.
As a workaround, you can use -f
to test for the existence of a regular file, or -r
if you aren't interested in unreadable files.
Better, change #!/bin/sh
to #!/usr/xpg4/bin/sh
or #!/bin/ksh
so as to get a POSIX shell.
Beware that [ $option -eq 9 ]
is probably not right: -eq
is a numerical comparison operator, but $option
isn't really numeric — it's a date. On a 32-bit machine, when 201301271355
is interpreted as a number, it is taken modulo 232. It so happens that no date in the 21st century is very close to 0 modulo 232, but relying on this is very brittle. Make this [ "$option" = 9 ]
instead.
As a general shell programming principle, always put double quotes around variable and command substitutions: "$foo"
, "$(foo)"
. If you don't, the shell splits the result at each whitespace character and treats each resulting word as a filename wildcard pattern. So an unprotected $foo
is only safe if the value of foo
does not contain any whitespace or [?*
. Play it safe and always use double quotes (unless you intend the splitting and pattern matching to happen).
¹ Or was it a ksh addition never ported to Bourne? I'm not sure.
answered Jan 29 '13 at 0:35
GillesGilles
548k13011131631
548k13011131631
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
add a comment |
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
Thanks @Gilles for the recommendation and the effort explaining it. But in this case, the $option is indeed a integer that is taken from the files names, presented in a menu and then given "copy/paste" or insert manually in the read option. I'll update the script with the '"' so I don't get surprises if a user makes a mistake with spaces. Thanks a lot.
– BitsOfNix
Jan 29 '13 at 7:34
add a comment |
Well this was easier than I though:
It seems that the -e
operator for the if
is not defined in bourne shell (sh) but only in bourne again shell (bash).
I replaced the if [ -e ...
by if [ -r ...
and it's working.
The standard test command supports the-e
flag, and that command is what standardsh
should support. Your answer is not correct forsh
in general, but only very old nonstandardsh
s on Solaris.
– kojiro
Jan 29 '13 at 0:40
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
add a comment |
Well this was easier than I though:
It seems that the -e
operator for the if
is not defined in bourne shell (sh) but only in bourne again shell (bash).
I replaced the if [ -e ...
by if [ -r ...
and it's working.
The standard test command supports the-e
flag, and that command is what standardsh
should support. Your answer is not correct forsh
in general, but only very old nonstandardsh
s on Solaris.
– kojiro
Jan 29 '13 at 0:40
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
add a comment |
Well this was easier than I though:
It seems that the -e
operator for the if
is not defined in bourne shell (sh) but only in bourne again shell (bash).
I replaced the if [ -e ...
by if [ -r ...
and it's working.
Well this was easier than I though:
It seems that the -e
operator for the if
is not defined in bourne shell (sh) but only in bourne again shell (bash).
I replaced the if [ -e ...
by if [ -r ...
and it's working.
edited Jan 28 '13 at 9:11
user1146332
1,919612
1,919612
answered Jan 28 '13 at 8:54
BitsOfNixBitsOfNix
4,21821832
4,21821832
The standard test command supports the-e
flag, and that command is what standardsh
should support. Your answer is not correct forsh
in general, but only very old nonstandardsh
s on Solaris.
– kojiro
Jan 29 '13 at 0:40
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
add a comment |
The standard test command supports the-e
flag, and that command is what standardsh
should support. Your answer is not correct forsh
in general, but only very old nonstandardsh
s on Solaris.
– kojiro
Jan 29 '13 at 0:40
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
The standard test command supports the
-e
flag, and that command is what standard sh
should support. Your answer is not correct for sh
in general, but only very old nonstandard sh
s on Solaris.– kojiro
Jan 29 '13 at 0:40
The standard test command supports the
-e
flag, and that command is what standard sh
should support. Your answer is not correct for sh
in general, but only very old nonstandard sh
s on Solaris.– kojiro
Jan 29 '13 at 0:40
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
@kojiro you will notice that I'm using #!/bin/sh, do the answer is indeed correct for this environment, I could agree if I would be using the other sh available like /usr/xpg4/bin/sh.
– BitsOfNix
Jan 29 '13 at 7:30
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f62811%2fbourne-shell-if-e-directory-file-suffix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
-bourne-shell, shell, solaris, test
On Solaris, don't use
/bin/sh
, use/usr/xpg4/bin/sh
to get a standard shell./bin/sh
is only for backward compatibility for old scripts that rely on/bin/sh
being a Bourne shell and not a standardsh
.– Stéphane Chazelas
Jan 28 '13 at 12:10
I need to maintain what is already previously being use and that sticks me to /bin/sh or perl.
– BitsOfNix
Jan 29 '13 at 7:31