The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-01-2007
barbus barbus is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 31
vlad

Hi people

I am trainee at a new job which requires me to use UNIX, am more than comfortable dealing with processes and so on, problem I am having is that files get to big 1000s of lines, and I am trying to number these lines using a script so I can deal with these files without losing track of which lines am looking at, problem is I cant get the number to go in front of the lines.

For example assume the file has the contents as follows:
Line of text One
Line of text Two
Line of text Three
Line of text Four

I want it to look like this
1)Line of text One
2)Line of text Two
3)Line of text Three
4)Line of text Four

But what I keep getting is
1)
2)
3)
4)
Line of text One
Line of text Two
Line of text Three
Line of text Four

My employer doesn’t want me using SED or AWK , which is a shame because I got it to work easy with either of them.
Also temp variables wont do as the system is restarted every 2hrs, and the process am trying to achieve has to be automated.

Any tips or suggestions will greatly appreciated.

thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0