ubuntu - How to put terminal commands into a file and run it -


i'm new ubuntu apologize lack of knowledge on subject.

is possible put terminal commands file in ubuntu 16.04 , run file , have commands executed?

for example.
if have file named 'somefile'

and in file have:

cd desktop

chmod + x top.sh 

top -n 1 -b > top-somefilename.txt

in terminal can run file , have commands executed? if how do it?

shell cripts in current folder executed in following way (with ./ @ beginning):

./top.sh


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -