I write a simple shell script which could be run like this
$ksh script1
But i donn't know how to execute it.Like
$script1
thanks.
I write a simple shell script which could be run like this
$ksh script1
But i donn't know how to execute it.Like
$script1
thanks.
Not sure if it works on AIX but on Linux you can say chmod +x script.sh to make it executable using ./script.sh in the script's directory or using /the/full/path/to/script.sh (if the script isn't in the system path)
to make it executable
chmod 755 /folder/of/your/script/script.sh
to make it callable from any folder in the system
export PATH=$PATH:/folder/of/your/script
to make it callable only from script.sh folder
export PATH=$PATH:.
Just do the following:
$ chmod u+x script1
$ ./script1
It's not recommended to add "." to your PATH environment variable due to security reasons.