how to run a shell script in command line?

Asked by Removed by request

i hv right one scripts is ubuntu and want run in command lin but not able to run?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Whiteboard:
Closed by Launchpad due to owner requesting account removal
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

you need to run

chmod +x <file>
sh ./<file>

the chmod +x marks it as executable. the second part launches it.

Make sure your location that the terminal is pointing to (your pwd or present working directory) is the same as the script you want to run.