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

Re: about installing lxde (which xserver)



Harry Putnam:
> 
> Nice unix command line too... It took me a bit to figure out why it
> would not copy paste to the cmdline.  Finally I realized that the mail
> formatting had broke a line you probably did not expect and so there
> was no newline escape following `END' in your message.

Yeah, sorry. I actually wrote everything in one line. When pasting it
into the mail, my editor inserted the line breaks and I just added a few
backslashes where I thought appropriate.

The actual problem I have when copy-pasting it back is that I didn't
quote the regular expression "^Installed-Size". Since it is in the
beginning of a line, bash interpreted it as a "quick substitution". JFTR
a copy-pasteable version:

for p in $( apt-cache show xserver-xorg-video-all  | grep ^Depends | \
cut -d: -f2 | sed -e 's#,##g'); do apt-cache show $p | grep \
"^Installed-Size" | cut -d: -f2; done | awk ' BEGIN { s=0 } { s+=$1 }
END { print s }'

The line before END doesn't needs it's newline escaped because of the
open single-quoted string.

J.
-- 
Thy lyrics in pop songs seem to describe my life uncannily accurately.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: