Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion How to number lines in text file
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dr John Stockton  
View profile  
 More options Aug 23 2006, 4:04 pm
Newsgroups: alt.msdos.batch.nt
From: Dr John Stockton <j...@merlyn.demon.co.uk>
Date: Wed, 23 Aug 2006 21:04:08 +0100
Local: Wed, Aug 23 2006 4:04 pm
Subject: Re: How to number lines in text file
JRS:  In article <je7oe2dkg30envcaihph5sokq11ch94...@4ax.com>, dated
Wed, 23 Aug 2006 11:22:23 remote, seen in news:alt.msdos.batch.nt, µ
<m...@nospam.skepp.be> posted :

>I see that some people put numbers in square brackets in front of
>their batch lines. (Like Bilious does in his posts)
>How can I do this?

>So in front of every line there should be [1] [2] and so on.

For those who prefer fixed-width line numbering,

        type file.txt | COLS ^4,10001 * 1- > file.tx1

In DOS..Win98, the two filenames can be the same; in NT, XP, maybe not.
Limits : 255 characters per line, 2^31-1 lines, IIRC.  COLS via sig.

--
 © John Stockton, Surrey, UK.  ?...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ©
 Web  <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
 PAS EXE TXT ZIP via <URL:http://www.merlyn.demon.co.uk/programs/00index.htm>.
 Do not Mail News to me.    Before a reply, quote with ">" or "> " (SoRFC1036)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.