OT: bash () bei variablen

jens wefer <[email protected]>
Newsgroups gmane.linux.gentoo.user.german
Organization LxSBBS
Message-ID <20130107022726.00002a6e@unknown>
hey,

ip_neu=`cat $TMPDIR/$TMPFILE | grep -Eo
'([0-9]{1,3}\.){3}[0-9]{1,3}'` laenge=${#untestedip}

damit hol ich ip's aus ner datei, da kommt dann einer oder auch meherer
getrennt mit space oder return.
ich will nur die erste, wenn mehr sind greif ich mir die erste als
substring.

klappt alles wie gewuenscht.

nun hab ich entdeckt das:
ip1=($ip_neu)
mir genau die gewuenschte 1.ip gibt.

hab gesucht und nix dazu in der doku gefunden, bzw. steht da was von
subshell, etc..
hat jmd nen tip was die klappern bei variablen bewirkt?

bye, jens.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.