What's the difference between !/bin/sh and !/bin/bash?
Posted: Tue 23 May 2006, 16:29
Hi!
Just wondered if anyone could help with this slightly odd problem!
In the Puppy console I can type:
Which is how it should be using the substition {a/b/n}
BUT if I do the same thing in a standard script I get an error:
I get: ...4: Syntax error: Bad Substitution
Am I going mad!
Just wondered if anyone could help with this slightly odd problem!
In the Puppy console I can type:
Code: Select all
#alpha="abcdef"
#echo ${alpha/abc/xyz}
#xyzdef
BUT if I do the same thing in a standard script I get an error:
Code: Select all
#!/bin/sh
alpha="abcdef"
echo ${alpha/abc/xyz}
Am I going mad!