[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: just survived from unbootable system - what was wrong?



Sandip P Deshmukh <deshmukh@escortsmumbai.com> [2002-12-21 12:49:47 +0530]:
> 
> #!/bin/sh
> INITTY=/dev/tty[1-6]
> for tty in $INITTY; do
> setleds -D +num &lt; $tty
> done
> [...]
> what is wrong with the script? is there any way in which i can make num
> lock turned on on all virtual consoles?

It is this line here.

> setleds -D +num &lt; $tty

That "&lt;" is an HTML transmogrification of "<".  Since < and > are
both used in HTML they are escaped into a different format.  Looks
like someone had posted this script on a web page and formatted it
into html.

Not knowing anything about this script I am sure they were intending
this instead.

  #!/bin/sh
  INITTY=/dev/tty[1-6]
  for tty in $INITTY; do
    setleds -D +num < $tty
  done

I don't know anything about setleds but it appears to operate on the
standard input.  Therefore this for loop walks through all of the
devices and provides it as standard input with the < redirect.

Bob

Attachment: pgpqTvWSkuGjK.pgp
Description: PGP signature


Reply to: