linux - Run text files in terminal -


does know if there's way run automatically in shell list of commands (from text file)?

i need run lot of scripts (around 1000). scripts in python , take 2 arguments each (dir_#, , sample#)

the text file i've made looks this...

     python /home/name/scripts/get_info.py dir_1 sample1      python /home/name/scripts/get_info.py dir_2 sample2      python /home/name/scripts/get_info.py dir_3 sample3      python /home/name/scripts/get_info.py dir_4 sample4      ... 

so, expect passing text file argument command in terminal, job automatically...

thanks in advance,

peixe

that's called "shell script."

add top of file:

#!/bin/sh 

then execute command:

chmod +x filename 

then execute program:

./filename 

alternately, can execute shell directly, telling execute commands in file:

sh -e filename 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -