10-05-2008
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that has 1k lines and i want to print all the lines after 900th line.
an 2)I want to move files f1 ,f2,f3,f4 to p1,p2,p3,p4
Please give me the commands.
Thanx in adv. (6 Replies)
Discussion started by: rajashekar.y
6 Replies
2. Shell Programming and Scripting
I have 2 pattern of lines (SQL query and Time taken)in a log i need to capture all SQL queries with time taken >20 sec and need to display as one line.
2 lines from log:
2007-10-23 11:39:17,061 DEBUG - SQL Query : SELECT A.GROUP_CD , C.FN_CD FROM UP_GROUP A , PRD_GROUP_TO_FN B , PRD_FN... (7 Replies)
Discussion started by: vithala
7 Replies
3. Shell Programming and Scripting
Hi all experts,
I am getting error in my shell scripts and i want to find out which lines is in errors. How i can display the line numbers . Is it NU command? Please give me some suggestions. (4 Replies)
Discussion started by: ma466
4 Replies
4. Shell Programming and Scripting
Hi,
I have a file will 1000 lines.... I want to deleted some line in the file... like 800-850 lines i want to remove in that...
can somebody help me..?
thanks. (2 Replies)
Discussion started by: Kattoor
2 Replies
5. Shell Programming and Scripting
hello everyone
my file contains many records, the following is a sample:
BEGIN
ASX1500000050002010120000000308450201012000177
ASX1100002000000201012000000038450201012000220
ASX1600100005000201012000000038450020101200177
ASX1900100006000201067000000058450020101200177... (2 Replies)
Discussion started by: neemoze
2 Replies
6. Shell Programming and Scripting
if i want to display the contents of a file between say line number 3 and 10 then i use the following command
sed -n '3,10p' filename
if this 3 was contained in x and 10 was contained in y then how wud this command modified?
sed -n '$x,$yp' filename does not work..please advise (2 Replies)
Discussion started by: arindamlive
2 Replies
7. UNIX for Dummies Questions & Answers
I have a file like this
DoctorName
Address1
Address2
DOB
InsuredName
Address1
Address2
DOB
PatientName
Address1
Address2
DOB
ClaimNo1
DoctorName
Address1
Address2
DOB
InsuredName (2 Replies)
Discussion started by: nsuresh316
2 Replies
8. Shell Programming and Scripting
Please can you let me know how to print all the matching lines from a file in one single line using awk. Thanks
I have the following data in the input file
data1
voice2
voice1
speech1
data2
data3
...
...
voice4
speech2
data4
and the output should be as follows
data1 data2... (4 Replies)
Discussion started by: Sudhakar333
4 Replies
9. UNIX for Dummies Questions & Answers
I want to replace lines. The files 1 are (separated by \t)
Gm01 phytozome9_0 three_prime_UTR 70641 70759 . - . ID=PAC:26323927.three_prime_UTR.1;Parent=PAC:26323927;pacid=26323927
Gm01 phytozome9_0 three_prime_UTR 90230 90692 . - . ... (1 Reply)
Discussion started by: grace_shen
1 Replies
10. Shell Programming and Scripting
I have a file of the following format:
$data1 size 1278
dataw
datat
datau
datai
$data2 size 456
datak
dataf
datat
datay
datal
$data3 size 154
datag
datas
datat
datar
datas (8 Replies)
Discussion started by: FelipeAd
8 Replies
NL(1) User Commands NL(1)
NAME
nl - number lines of files
SYNOPSIS
nl [OPTION]... [FILE]...
DESCRIPTION
Write each FILE to standard output, with line numbers added.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-b, --body-numbering=STYLE
use STYLE for numbering body lines
-d, --section-delimiter=CC
use CC for logical page delimiters
-f, --footer-numbering=STYLE
use STYLE for numbering footer lines
-h, --header-numbering=STYLE
use STYLE for numbering header lines
-i, --line-increment=NUMBER
line number increment at each line
-l, --join-blank-lines=NUMBER
group of NUMBER empty lines counted as one
-n, --number-format=FORMAT
insert line numbers according to FORMAT
-p, --no-renumber
do not reset line numbers for each section
-s, --number-separator=STRING
add STRING after (possible) line number
-v, --starting-line-number=NUMBER
first line number for each section
-w, --number-width=NUMBER
use NUMBER columns for line numbers
--help display this help and exit
--version
output version information and exit
By default, selects -v1 -i1 -l1 -sTAB -w6 -nrn -hn -bt -fn. CC are two delimiter characters used to construct logical page delimiters, a
missing second character implies :. Type \ for . STYLE is one of:
a number all lines
t number only nonempty lines
n number no lines
pBRE number only lines that contain a match for the basic regular expression, BRE
FORMAT is one of:
ln left justified, no leading zeros
rn right justified, no leading zeros
rz right justified, leading zeros
AUTHOR
Written by Scott Bartram and David MacKenzie.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report nl translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
Full documentation at: <http://www.gnu.org/software/coreutils/nl>
or available locally via: info '(coreutils) nl invocation'
GNU coreutils 8.28 January 2018 NL(1)