Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Another scripting help please, splitting files by range, maybe I don't need a script :( Post 303044582 by RudiC on Thursday 27th of February 2020 02:30:17 AM
Old 02-27-2020
Looks like you're searching for the C: string to split upon. How about
Code:
csplit -f "file_to_split.file." -b "%02d.txt" file_to_split.txt "/C:/" "{*}"

to replace your entire script above?

Last edited by RudiC; 02-27-2020 at 07:29 AM..
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automated ftp script from unix -date range of files

Hi , I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated. Thanks, Ravi :) (1 Reply)
Discussion started by: koduri0475
1 Replies

2. Programming

automated ftp script from unix -date range of files

Hi , I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated. Thanks, Ravi :) (1 Reply)
Discussion started by: koduri0475
1 Replies

3. UNIX for Advanced & Expert Users

automated ftp script from unix -date range of files

Hi , I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated. Thanks, Ravi :) (1 Reply)
Discussion started by: koduri0475
1 Replies

4. Shell Programming and Scripting

Script that can Copy a Range of files from Tape to Hard disk

Hi: I am a trying to write a script using a loop i guess. What I need to do is write a script that can allow my users to load a tape and copy a range of files from a tape to the hard disk. By range I mean, I would like the users to pick a range of numbers like files 3 - 8 and the script will... (0 Replies)
Discussion started by: msjazzie
0 Replies

5. Shell Programming and Scripting

Script to move files based on Pattern don't work

Hi people, i need you help on this if you can. I have a script that does the move command when it searches for a that doesn't match the pattern. This Pattern is on a list. When it run's and doesn´t found no files but it haves 2 more folders it moves the folders too. Ex:... (1 Reply)
Discussion started by: osramos
1 Replies

6. Shell Programming and Scripting

Need script to select multiple files from archive directory based on the date range

hi all, here is the description to my problem. input parameters: $date1 & $date2 based on the range i need to select the archived files from the archived directory and moved them in to working directory. can u please help me in writing the code to select the multiple files based on the... (3 Replies)
Discussion started by: bbc17484
3 Replies

7. Shell Programming and Scripting

Splitting the files via shell script

Hi all, We have 102 flat files created by Informatica from 102 tables. These 102 files contain pharmcy details. There are a total of 450 pharmcyids.The naming convention for the flat file is ODS_<TABLE NAME>_yyyymmdd_timestamp.dat. Each flat file may contain data for 450 pharmacies which is... (2 Replies)
Discussion started by: Maya_Pillai
2 Replies

8. UNIX for Advanced & Expert Users

Help with ksh script to list, then cp files from a user input date range

Hi, I'm quite new to ksh scripting, can someone help me with this. Requirements: I need to create a script that list the files from a user input date range. e. g. format of file: *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00*... (1 Reply)
Discussion started by: chococrunch6
1 Replies

9. Shell Programming and Scripting

Splitting a file and creating new files using Perl script

Hi All, I am new to Scripting language. I want to split a file and create several subfiles using Perl script. Example : File format : Sourcename ID Date Nbr SU IMYFDJ 9/17/2012 5552159976555 SU BWZMIG 9/14/2012 1952257857887 AR PEHQDF 11/26/2012 ... (13 Replies)
Discussion started by: Deepak9870
13 Replies

10. Shell Programming and Scripting

Script for splitting file of records into multiple files

Hello I have a file of following format HDR 1234 abc qwerty abc def ghi jkl HDR 4567 xyz qwerty abc def ghi jkl HDR 890 mno qwerty abc def ghi jkl HDR 1234 abc qwerty abc def ghi jkl HDR 1234 abc qwerty abc def ghi jkl -Need to split this into multiple files based on tag... (8 Replies)
Discussion started by: wincrazy
8 Replies
splitshp(1)						      General Commands Manual						       splitshp(1)

NAME
splitshp - Split Shape into frames or combine frames into Shapes SYNOPSIS
splitshp SHAPE FRAME... splitshp SHAPE DESCRIPTION
Shape files are used for storage of all visible elements (from UI buttons to terrain features) of the games Exult supports. Shapes contain one or more frames. splitshp can be used to combine frames into one file, or split a Shape file into its component frames. The mode of operation is determined by looking at the number of commandline arguments. Exactly one argument means splitting, more than one argument signals a combining operation. Combining Each FRAME names a Shape file typically consisting of only one frame (i.e. subsequent frames are ignored). All these frames are concate- nated and written to the Shape file SHAPE. Splitting SHAPE will be read and split into its component frames. Each of those will be written to its own Shape file. The names of these files are determined by splitting the name of SHAPE before the last dot -- anything before this dot is the STEM, anything else (including the dot) is the PREFIX, which may be empty in case there is no dot in the name. The output files are then named STEM_nnSUFFIX with nn replaced by the frame number. EXAMPLES
splitshp button.shp button-up.shp button-down.shp Packs the (first) two frames from button-up.shp and button-down.shp into the Shape file button.shp splitshp grizzly Unpacks the frames contained in the Shape file grizzly into the (single-frame) Shape files grizzly_00, grizzly_01, grizzly_02, etc. splitshp boar.new.shp Unpacks the frames contained in the Shape file boar.new.shp into the (single-frame) Shape files boar.new_00.shp, boar.new_01.shp, boar.new_02.shp, etc. AUTHOR
This manpage was written by Robert Bihlmeyer. It may be freely redistributed and modified under the terms of the GNU General Public License version 2 or higher. SEE ALSO
exult(6), shp2pcx(1) Exult 2002-03-24 splitshp(1)
All times are GMT -4. The time now is 08:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy