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.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cut between characters of a file a1_win Shell Programming and Scripting 3 07-18-2009 11:01 AM
How do I test if a file contains particular characters medonne1 UNIX for Dummies Questions & Answers 3 04-22-2009 02:12 PM
\r characters in the file infyanurag Shell Programming and Scripting 2 11-07-2008 06:54 AM
Rename file based on first 3 characters of data in file jchappel UNIX for Dummies Questions & Answers 3 10-01-2008 03:21 PM
how to see special characters in a file using vi jingi1234 UNIX for Dummies Questions & Answers 6 10-19-2005 12:57 PM

Reply
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
  #1 (permalink)  
Old 4 Weeks Ago
mohan_xunil mohan_xunil is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 10
Need to cut first 21 and 32-25 characters from file

Guys,
can you help me in doing cut first 21 and 32-35 characters from file.

I tried with cut -c to cut first 21 characters ,It is succeeded.
But i need both first 21 and 32-35.
  #2 (permalink)  
Old 4 Weeks Ago
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
'man cut' yields:

Code:
     -c list
           The list following -c  specifies  character  positions
           (for  instance, -c1-72 would pass the first 72 charac-
           ters of each line).

     list  A comma-separated or blank-character-separated list of
           integer  field  numbers  (in  increasing  order), with
           optional - to indicate ranges  (for  instance,  1,4,7;
           1-3,8;  -5,10  (short  for  1-5,10);  or 3- (short for
           third through last field)).

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 On




All times are GMT -4. The time now is 07:58 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