Read file line by line and perform action for each in bash

前端 未结 3 1848
-上瘾入骨i
-上瘾入骨i 2020-12-18 15:09

I have a text file, it contains a single word on each line.

I need a loop in bash to read each line, then perform a command each time it reads a line, using the inpu

3条回答
  •  有刺的猬
    2020-12-18 16:09

    while read line
    do
       nikto -Tuning x 1 6 -h $line -Format html -o NiktoSubdomainScans.html
    done < testfile.txt
    

    Tried this to automate nikto scan of list of domains after changing from cat approach. Still just read the first line and ignored everything else.

提交回复
热议问题