Sample Header Ad - 728x90

Shell Script Execution with Bash and without bash on command line

1 vote
0 answers
26 views
I have a shell script that reads data from a file and stores it into an array. When i execute the script like bash scriptname.sh i dont get any errors but when i execute it using sh scriptname.sh i get errors like array deceleration not found some syntax errors like parentheses are expected. why differences are coming between these two approaches??
Asked by vaibhav kumar (51 rep)
Nov 2, 2016, 10:18 AM
Last activity: Nov 2, 2016, 10:22 AM