Berkeley CSUA MOTD:Entry 11831
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2004/1/19-20 [Computer/SW/Languages/Misc, Academia/Berkeley/CSUA/Motd] UID:11831 Activity:very high
1/19    Why does /csua/bin/motdbrowser format the line-indents(tabs&spaces)
        differently from simply: less /etc/motd?
        \_ Because they're using "less -r" instead of "less -R"
           \_ neither less -r nor less -R give the indenting of motdbrowser.
              see the first two replies in the caucus thread below for an
              example, or the first line of the Stock market post below.
              \_ Um..  Did you even read the script?  Come back when you
                 have a clue.
                 \_ open(LESS, "| less -r")
                    while (<MOTD>) { ... print LESS; }
                    so why does piping the file line-by-line thru less -r
                    give a different stdout than "less -r /etc/motd?" The
                    difference seems to be related to how the "| less -r"
                    interprets tabs, but seems inconsistent.
                    \_ Not the tabs.  The color codes.