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



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

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #8 (permalink)  
Old 11-26-2009
drl's Avatar
drl drl is offline Forum Advisor  
Registered User
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 776
Hi.

It would not save any time, but (for me) less typing usually means fewer msitakes. So for sed:

Code:
sed '1s/$/,1,2/' filename

cheers, drl
Sponsored Links
Reply

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shell script to read file line by line ani12345 UNIX for Dummies Questions & Answers 4 07-13-2009 05:50 PM
shell script to read a line in gps receiver log file and append that line to new file gudivada213 Shell Programming and Scripting 3 06-24-2009 07:16 AM
Append each line to next previous line in a file sudhakaryadav Shell Programming and Scripting 8 06-01-2009 12:21 PM
shell script to process file line by line royalsing UNIX for Dummies Questions & Answers 5 09-17-2008 05:22 AM
Shell script to append a time for the existing error log file gsprasanna UNIX for Advanced & Expert Users 12 07-12-2007 06:07 AM



All times are GMT -4. The time now is 12:21 PM.


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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0