10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I Have a large file with 24hrs log in the below format.i need to split the large file in to 24 small files on one hour based.i.e ex:from 09:55 to 10:55,10:55-11:55
can any one help me on this.!
... (20 Replies)
Discussion started by: Raghuram717
20 Replies
2. Shell Programming and Scripting
Split large xml into mutiple files and with header and footer in file
tried below
it splits unevenly and also i need help in adding header and footer
command :
csplit -s -k -f my_XML_split.xml extrfile.xml "/<Document>/" {1}
sample xml
<?xml version="1.0" encoding="UTF-8"?><Recipient>... (36 Replies)
Discussion started by: karthik
36 Replies
3. Shell Programming and Scripting
Dear all,
I have huge txt file with the input files for some setup_code. However for running my setup_code, I require txt files with maximum of 1000 input files
Please help me in suggesting way to break down this big txt file to small txt file of 1000 entries only.
thanks and Greetings,
Emily (12 Replies)
Discussion started by: emily
12 Replies
4. Shell Programming and Scripting
Hi,
I need to split a large array "@sharedArray" into 10 small arrays.
The arrays should be like @sharedArray1,@sharedArray2,@sharedArray3...so on..
Can anyone help me with the logic to do so :(:confused: (6 Replies)
Discussion started by: rkrish
6 Replies
5. Shell Programming and Scripting
This is my file(Target.txt)
name|age|locaction
abc|23|del
xyz|24|mum
jkl|25|kol
The file should be like this
1|03252012
1|name|age|location
2|abc|23|del
2|xyz|24|mum
2|jkl|25|kol
2|kkk|26|hyd
3|4
Column 1 is row indicator
for row 1 and 2, column indicator is 1,for data rows... (1 Reply)
Discussion started by: itsranjan
1 Replies
6. Shell Programming and Scripting
Hi, Guys,
I want add header and footer in a file. I can add footer using following command:
echo "Footer" >>file.
I don't know how to add header.
Thanks in advance (4 Replies)
Discussion started by: ken002
4 Replies
7. Shell Programming and Scripting
Dear All,
Could you please help me to split a file contain around 240,000,000 line to 4 files all equally likely , note that we need to maintain that the end of each file should started by start flage (MSISDN) and ended by end flag (End), also the number of the line between the... (10 Replies)
Discussion started by: ahmed.gad
10 Replies
8. Shell Programming and Scripting
Hi
I want to split a file that has 'n' number of records into 16 small files.
Can some one suggest me how to do this using Unix script?
Thanks
rrkk (10 Replies)
Discussion started by: rrkks
10 Replies
9. Shell Programming and Scripting
I have one large file, after every 200 line i have to split the file and the add header and footer to each small file?
It is possible to add different header and footer to each file? (1 Reply)
Discussion started by: ashish4422
1 Replies
10. Shell Programming and Scripting
Hi,
I need to split a large file into small files based on a string.
At different palces in the large I have the string ^Job.
I need to split the file into different files starting from ^Job to the last character before the next ^Job.
Also all the small files should be automatically named.... (4 Replies)
Discussion started by: dncs
4 Replies
nl(1) General Commands Manual nl(1)
NAME
nl - line numbering filter
SYNOPSIS
type] type] type] start#] incr] sep] width] format] num] delim] [file]
DESCRIPTION
reads lines from the named file or the standard input if no file is named and reproduces the lines on the standard output. Lines are num-
bered on the left in accordance with the command options in effect.
views the text it reads in terms of logical pages. Line numbering is reset at the start of each logical page. A logical page consists of
a header, a body, and a footer section. Empty sections are valid. Different line numbering options are independently available for
header, body, and footer (e.g., no numbering of header and footer lines while numbering blank lines only in the body).
The start of logical page sections are signaled by input lines containing nothing but the following delimiter character(s):
|
Line contents | Start of
--------------+----------
::: | header
:: | body
: | footer
Unless told otherwise, assumes the text being read is in a single logical page body.
Command options can appear in any order and can be intermingled with an optional file name. Only one file can be named. recognizes the
following options:
Specifies which logical page body lines are to be numbered.
Recognized types and their meanings are:
number all lines;
number lines with printable text only;
no line numbering;
number only lines that contain the regular expression
specified in string. Basic Regular Expression syntax is supported (see regexp(5)).
The default type for logical page body is (text lines numbered).
Same as except for header. Default type for logical page header is (no lines numbered).
Same as except for footer. Default for logical page footer is (no lines numbered).
Do not restart numbering at logical page delimiters.
start# is the initial value used to number logical page lines. Default is
incr is the increment value used to number logical page lines. Default is
sep is the character or characters used in separating the line number and the corresponding text line. Default sep is a
tab.
width is the number of character columns to be used for the line number. Default width is
format is the line numbering format. Recognized values are:
left justified, leading zeroes
suppressed;
right justified,
leading zeroes suppressed;
right justified, leading zeroes kept.
Default format is (right justified).
num is the number of consecutive blank lines to be treated and numbered as a single line. For example, results in every
third adjacent blank line being numbered if the appropriate and/or option is set. Default is
The delimiter characters specifying the start of a logical page
section can be changed from the default characters to two user-specified characters. If only one character is entered,
the second character remains the default character No space should appear between the and the delimiter characters, how-
ever, this restriction is not there for (see standards(5)) compliant To define a backslash as the delimiter, use two
backslashes.
EXTERNAL INFLUENCES
For information about the UNIX Standard environment, see standards(5).
Environment Variables
determines the collating sequence used in evaluating regular expressions.
determines the characters matched by character class expressions in regular expressions.
If or is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty
variable. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single-byte character code sets are supported.
EXAMPLES
Number starting at line number 10, using an increment of ten. The logical page delimiters are and
SEE ALSO
pr(1), environ(5), lang(5), regexp(5), standards(5).
STANDARDS CONFORMANCE
nl(1)