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

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -