Article 4TKAE Red Hat Enterprise 7.7

Red Hat Enterprise 7.7

by
AvivKR
from LinuxQuestions.org on (#4TKAE)
Hello all,
I'm new in Linux world.
And I learning to writes scripts..
I've tried to write some script that get a server list, and ports list
and make nmap when done sent it to temp.txt
this is how it's look like:
Code:for i in cat serverlist.txt
do
for k in Portlist.txt
$(nmap $i) > temp.txt
grep $k temp.txt >> serveropenports.txt

doneWhen running this script get this error:

./forloop.sh: line 21: syntax error at line 40: `$(nmap $i)' unexpected

What is the problem?
Thanks for helping! :)latest?d=yIl2AUoC8zA latest?i=qr0RJVQZlcc:OU3DqWBoucA:F7zBnMy latest?i=qr0RJVQZlcc:OU3DqWBoucA:V_sGLiP latest?d=qj6IDK7rITs latest?i=qr0RJVQZlcc:OU3DqWBoucA:gIN9vFwqr0RJVQZlcc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments