From: Janis Papanagnou on 3 Mar 2010 21:54 mop2 wrote: > On Wed, 03 Mar 2010 19:46:56 -0300, Janis Papanagnou > <janis_papanagnou(a)hotmail.com> wrote: > >> mop2 wrote: >>> On Wed, 03 Mar 2010 07:17:18 -0300, LC's No-Spam Newsreading account >>> <nospam(a)mi.iasf.cnr.it> wrote: >>>> Hmmm ... telnet is scriptable at the price of using expect (which I >>>> had to use only twice in my life, one being the other swith >>>> case). In >>>> the case of the new switches I can't find the relevant info in the >>>> telnet interface. Also the script is last resort, I am phasing out >>>> the scripts for interactive use (I'd probably keep them for >>>> crontabs) in favour of java, and prefer to do HMTL parsing in java >>>> >>> You can try html with shell: >> >> ITYM "bash shell". >> >>> x=0;while read -d\>;do printf "<$x>${REPLY%<*}";x=$[x+1];done >>> [...] > > > Why? > Well, about the syntax, possibly, [...] Exactly. You've used bash specific syntax unnecessarily, while $(( )) is standard and widely available with POSIX shells. Janis
First
|
Prev
|
Pages: 1 2 3 Prev: Processing stdin in blocks Next: Bash directory traversal with spaces |