The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Variables bobo UNIX for Dummies Questions & Answers 1 01-18-2007 10:37 PM
doing a sed on certain variables seaten UNIX for Dummies Questions & Answers 10 09-05-2005 07:45 PM
doing a sed with variables seaten Shell Programming and Scripting 1 05-06-2005 12:08 PM
doing a sed with variables seaten UNIX for Dummies Questions & Answers 1 05-06-2005 11:48 AM
Using Variables to Set Other Variables superdelic UNIX for Dummies Questions & Answers 3 04-21-2005 07:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-06-2007
Registered User
 

Join Date: Sep 2006
Posts: 55
using variables in sed

a=2
sed -n "/${a}/p" list | cut -d "#" -f1

this dosen't print only second line.....

how can it b done....
Reply With Quote
Forum Sponsor
  #2  
Old 06-07-2007
Shell_Life's Avatar
Registered User
 

Join Date: Mar 2007
Location: Bahia, Brazil
Posts: 695
Code:
a=2
sed -n "${a}p" list | cut -d "#" -f1
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:52 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0