10-10-2005
Dear Friends,
thanks for ur replis,
it will be a great help if u solve the following problem
I am using csplit to split the files,
i.e.,
csplit -f filetype_ -n 3 filename '/regexpn/' {5}
which will split file "filename" into 5 subfiles
filetype_000
filetype_001
filetype_002
filetype_003
filetype_004
but if I run the csplit commad again it will rewrite the previous subfiles.
What I need is to continue with existing files
i.e., if I run the csplit command,
it should continue to split files and produce follwoing subfiles
filetype_005
filetype_006
filetype_007
filetype_008
filetype_009
do not affecting
filetype_000
filetype_001
filetype_002
filetype_003
filetype_004
and finally I should have
filetype_000
filetype_001
filetype_002
filetype_003
filetype_004
filetype_005
filetype_006
filetype_007
filetype_008
filetype_009
please tell me how do I proceed.
Thanks in advance,
Kumar
9 More Discussions You Might Find Interesting
1. Solaris
HI all,
I would like to know, how we can remove a package?
I know that pkgrm will do the job ,but specifying the right kinda package is important..
And i dont know how to figure that one out?
Eg:if i have installed a pkg called virtualbox,
If i do,
pkgrm SUNWvirtualbox ,it says "no such file... (2 Replies)
Discussion started by: wrapster
2 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
I am a unix dummy. I am trying to remove spaces between fields. I have the file in the following format
12332432, 2345 , asdfsdf ,100216 , 9999999
12332431, 2341 , asdfsd2 ,100213 , 9999999
&... (2 Replies)
Discussion started by: nitinbjoshi
2 Replies
3. Shell Programming and Scripting
I assume removing whitespaces in the n first characters of a string would be an easy task for sed? If so, how? (7 Replies)
Discussion started by: KidCactus
7 Replies
4. Shell Programming and Scripting
Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,... (11 Replies)
Discussion started by: dvah
11 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have got a XML file which has got content as follows:
<FUNCall81110000 Tag="81110000" CallDate="25/08/11" CallTime="00:03:22" TotalUsageValue="30" MeasurementUnit="1"/>
I want to remove TotalUsageValue="30" only
and TotalUsageValue="XXXXX"
here XXX can be any value. (1 Reply)
Discussion started by: muchyog
1 Replies
6. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
7. Post Here to Contact Site Administrators and Moderators
Hi Sir,
There is an escalation going on this and could you please remove the words from the following link .
this is really critical.
https://www.unix.com/shell-programming-and-scripting/196647-remove-headings.html
please remove following terms
fiappl17dev
fiappl18dev ... (1 Reply)
Discussion started by: ptappeta
1 Replies
8. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
9. UNIX for Beginners Questions & Answers
Hello All,
I have a pipe delimited file and below is a sample data how it looks:
CS123 | | || 5897 | QXCYN87876
As stated above, the delimited files contains sometimes only spaces as data fields and sometimes there are extra spaces before/after numeric/character data fields. My requirement... (4 Replies)
Discussion started by: amvip
4 Replies
split(1) User Commands split(1)
NAME
split - split a file into pieces
SYNOPSIS
split [-linecount | -l linecount] [-a suffixlength] [ file [name]]
split [ -b n | nk | nm] [-a suffixlength] [ file [name]]
DESCRIPTION
The split utility reads file and writes it in linecount-line pieces into a set of output-files. The name of the first output-file is name
with aa appended, and so on lexicographically, up to zz (a maximum of 676 files). The maximum length of name is 2 characters less than the
maximum filename length allowed by the filesystem. See statvfs(2). If no output name is given, x is used as the default (output-files will
be called xaa, xab, and so forth).
OPTIONS
The following options are supported:
-linecount | -l linecounNumber of lines in each piece. Defaults to 1000 lines.
-a suffixlength Uses suffixlength letters to form the suffix portion of the filenames of the split file. If -a is not specified,
the default suffix length is 2. If the sum of the name operand and the suffixlength option-argument would create a
filename exceeding NAME_MAX bytes, an error will result; split will exit with a diagnostic message and no files
will be created.
-b n Splits a file into pieces n bytes in size.
-b nk Splits a file into pieces n*1024 bytes in size.
-b nm Splits a file into pieces n*1048576 bytes in size.
OPERANDS
The following operands are supported:
file The path name of the ordinary file to be split. If no input file is given or file is -, the standard input will be used.
name The prefix to be used for each of the files resulting from the split operation. If no name argument is given, x will be used as
the prefix of the output files. The combined length of the basename of prefix and suffixlength cannot exceed NAME_MAX bytes. See
OPTIONS.
USAGE
See largefile(5) for the description of the behavior of split when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of split: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
csplit(1), statvfs(2), attributes(5), environ(5), largefile(5), standards(5)
SunOS 5.10 16 Apr 1999 split(1)