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

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -