prints line numbers

2010-05-27 1 min read bash

$ nl

others:
perl -ne ’print ”$. – $_”’ $1
grep -n . $1
perl -pe ’print ”$. ”’ $1
cat -n $1

  • <a href="http://www.commandlinefu.com/commands/view/4273/prints-line-numbers">View this command to comment, vote or add to favourites
  • <a href="http://feeds2.feedburner.com/commands/by/solarislackware">View all commands by <a href="http://feeds2.feedburner.com/commands/by/solarislackware">solarislackware

<a href="http://www.commandlinefu.com"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" alt="" align="bottom" />

by David Winterbottom (<a href="http://codeinthehole.com">codeinthehole.com)

<a href="http://feedads.g.doubleclick.net/~a/J0FNu7gmMTrQGT61-3dKUYYmlBY/0/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/J0FNu7gmMTrQGT61-3dKUYYmlBY/0/di" alt="" align="bottom" />
<a href="http://feedads.g.doubleclick.net/~a/J0FNu7gmMTrQGT61-3dKUYYmlBY/1/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/J0FNu7gmMTrQGT61-3dKUYYmlBY/1/di" alt="" align="bottom" />

<img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~r/Command-line-fu/~4/L6W6GZj7Dl8" alt="" width="1" height="1" align="bottom" />

URL: <a href="http://feedproxy.google.com/~r/Command-line-fu/~3/L6W6GZj7Dl8/prints-line-numbers">http://feedproxy.google.com/~r/Command-line-fu/~3/L6W6GZj7Dl8/prints-line-numbers<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/11/18/tech-tip-find-directories-over-a-certain-size/">Tech Tip: Find Directories Over a Certain Size (slumpedoverkeyboarddead.com) <li class="zemanta-article-ul-li"><a href="http://perlhacks.com/2009/09/the-definitive-guide-to-catalyst.php">perl hacks: The Definitive Guide to Catalyst (perlhacks.com) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2009/11/17/calculations/">Calculations (amit-agarwal.co.in) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/d8638d5d-2297-4bda-87fb-175aa19d7b42/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b30.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">

comments powered by Disqus