![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a columnfrom a specifit line number to a specific line number | Ezy | Shell Programming and Scripting | 2 | 05-12-2008 05:29 AM |
| generating line numbers | sam4now | Shell Programming and Scripting | 7 | 04-28-2008 03:17 PM |
| Appending line number to each line and getting total number of lines | chiru_h | Shell Programming and Scripting | 2 | 03-25-2008 07:19 AM |
| Unix Script with line number at beginning of each line. | mascorro | Shell Programming and Scripting | 5 | 06-19-2006 01:34 PM |
| identifying duplicates line & reporting their line number | stresslog | UNIX for Dummies Questions & Answers | 5 | 04-23-2006 09:43 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Generating line number
Hi,
I am generating a file through some Datastage commands: cat $TempDir/stage.txt |while read line do stagename=`echo $line` dsjob -llinks $proj $jobname $stagename 2>/dev/null >> $TempDir/LinkName.txt Now i have to assign the number to the columns generated in Linkname.txt file..How can i achieve this? Thanks in Advance! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Post a snippet of the input and desired output. My telephatic powers are a still a bit down that early in the morning without a cup of coffee
|
|
#3
|
|||
|
|||
|
Hi,
My file is DSLink43 DSLink46 DSLink48 DSLink46 DSLink46 DSLink44 My desired ouput is: 1.DSLink43 2.DSLink46 3.DSLink48 4.DSLink46 5.DSLink46 6.DSLink44 Thanks In Advance! |
|
#4
|
|||
|
|||
|
Code:
cat -n file-name > new_file |
|
#5
|
|||
|
|||
|
#6
|
||||
|
||||
|
Or:
Code:
nl file>new |
||||
| Google The UNIX and Linux Forums |