The UNIX and Linux Forums  


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



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
  #1 (permalink)  
Old 11-14-2009
Registered User
 

Join Date: Nov 2009
Posts: 1
Question csplit suffix-format: how to?

I am using GNU csplit to extract chapters from a big file into smaller files.

I want to use the -b option

-b, --suffix-format=FORMAT use sprintf FORMAT instead of %d

but I have failed so far.

1) All the generated files need to have a suffix .txt at the end
2) They have to look like something chapter.xxx.txt <-- .txt extremely important

Cheers
  #2 (permalink)  
Old 11-15-2009
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 6,006

Code:
csplit -b "%04d.txt"  inputfilename

Sponsored Links
Reply

Bookmarks

Tags
csplit suffix-format

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
csplit issue uandme2k2 Shell Programming and Scripting 1 10-06-2009 03:11 PM
Problem with csplit shreekrishnagd Shell Programming and Scripting 4 02-06-2009 11:26 AM
prefix suffix to each argument tostay2003 Shell Programming and Scripting 1 01-02-2009 05:54 PM
How to rename multiple files with a common suffix er_ashu UNIX for Dummies Questions & Answers 1 09-28-2007 11:52 AM
csplit problem....please help me kumar1 Shell Programming and Scripting 2 10-07-2005 07:04 AM



All times are GMT -4. The time now is 10:06 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-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0