Path: utzoo!utgpu!watserv1!watmath!att!pacbell.com!ucsd!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.lang.perl Subject: Re: Displaying a Right Justified CWD Message-ID: <1991Jan26.003544.668@iwarp.intel.com> Date: 26 Jan 91 00:35:44 GMT References: <5708@idunno.Princeton.EDU> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 24 In-Reply-To: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) In article <5708@idunno.Princeton.EDU>, subbarao@phoenix (Kartik Subbarao) writes: | note that this is one line, chopped conveniently for viewing. This alias | was generated by Dan Bernstein's makealias, from the following, less | gruesome construct: | | > perl -e 'for (1..(79-length($ENV{'\''PWD'\''}))) { print " "; }; | print $ENV{'\''PWD'\''}; print "\r";' | | (Again, split up for (reasonable) readability). | | | So what do you guys think? I'd certainly like a less quotish way, if | possible. But I guess this did finally make me learn quoting rules :-) perl -e 'printf "%79s\r", $ENV{"PWD"}' The right tool for the right job. :-) print "Just another Perl [book] hacker,"# :-) -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/