|
Search:
Advanced search
|
Browse by category:
|
Glossary |
Bash programming (the FOR function) |
||||
To run a command many times over or to process many linux commands via a bash script.
Can be done by placing the key words in a file one element per line, with no spaces for instance: the text file is called elements.txt and ti contains: mydomain.co.za webhosting.co.za Then in the shell run this command. for i in `cat elements.txt `; do dig @ns1.nameserver.com $i; done This command will loop through the file and dig the name server for each domain in your txt file. NOTE: remeber to keep the backtick ` do not confuse it with a ' |
||||
Powered by
KnowledgebasePublisher (Knowledgebase software)

