What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Little scripting question

fritsp1989

Regular Contributor
Hello i am trying to understand the basics of scripting for my router and i got a script from this forum to wake up my computer when trying to acces a port on my router.
I am adjusting it to my needs so it will listen to destination AND ports instead of only the destination.

This is the original line:
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ {print }' | tail -1`

This is my new one

NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ && /DPT='"$PORTS"'/{print }' | tail -1`

Now in the top of the file i need to specify :

PORTS=

But how do i argument multiple ports for example 80 443 8080
Should that be : or || ?
I am not sure i googled it but i did not found what i was looking for.

Does anyone have suggestions ?
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top