The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Require Help for Shell Script jagnikam Shell Programming and Scripting 14 02-04-2008 04:04 AM
require alternate command for lsof logic0 UNIX for Dummies Questions & Answers 1 05-17-2007 12:41 AM
Regarding use and require keywords sweta Shell Programming and Scripting 2 03-16-2006 08:09 AM
Command to require OS info malaymaru SUN Solaris 4 05-02-2005 10:07 PM
require in first line ibidris2003 Shell Programming and Scripting 2 10-21-2003 03:21 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 09-03-2005
Registered User
 

Join Date: Sep 2005
Posts: 1
require help about cut command

hi, im trying to cut the file using cut command in unix . the problem is i want to input the chacter list from another file and then using the postioins specified in this file i want to cut another file.
for eg.
cut -c(here i want to use a list being read from a file) listdata(this is the file i want to cut)
can anyone help and tell me a suitable soution
Reply With Quote
Forum Sponsor
  #2  
Old 09-03-2005
Registered User
 

Join Date: Mar 2005
Posts: 18
Your requirement is still not clear. Better you exemplify your problem.
Reply With Quote
  #3  
Old 09-04-2005
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,248
Try..
Code:
$ head file[12]
==> file1 <==
1,3-5

==> file2 <==
abcdefg

$ cut -c$(<file1) file2
acde
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:02 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