Xref: utzoo comp.unix.questions:21885 comp.lang.perl:1243 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!oliveb!orc!inews!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.questions,comp.lang.perl Subject: Re: stupid unix commands Message-ID: <1990May2.173042.11955@iwarp.intel.com> Date: 2 May 90 17:30:42 GMT References: <15633@phoenix.Princeton.EDU> <4108@sbsvax.cs.uni-sb.de> <1574@island.uu.net> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 22 In-Reply-To: daniel@island.uu.net (Dan Smith "fast screens, loud music, slow car") In article <1574@island.uu.net>, daniel@island (Dan Smith "fast screens, loud music, slow car") writes: | I've found "yes" does have a use for generating a list of numbers | in a shell script, a la: | | yes "" | cat -n | head -20 | tail -10 Gack. Get Perl: perl -e 'for (11..20) {printf "%6d\n",$_;}' ...if you need the leading whitespace, and... perl -e '@a=11..20; print "@a"' if you just want whitespace separated values. print "Just another Perl 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: "Welcome to Portland, Oregon, home of the California Raisins!"=/