Ich würde gerne eine Eingabe die eine IP sein soll überprüfen.
Einfach if [ ip = regulärer Ausdruck ] scheint ja nicht zu
funktionieren. Jetzt hab ich das mal in verbindung mit awk
versucht. Bin leider aber zu keinem Ergebniss gekommen.
iptest=`echo "${2}" | awk '/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/ { print "ok" }'`
So wie es nun da steht funzt das nun aber nicht.
Weis da jemand eine Lösung ?
Gruß
ALex
Wie kann ich per bash script eine Ip eingabe überprüfen ?
Re: Wie kann ich per bash script eine Ip eingabe überprüfen ?
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: Wie kann ich per bash script eine Ip eingabe überprüfen ?
Super. So klappt das.
Danke
Danke
