I have a comma-separated record and I'd like to use sed to pull the Nth record from it.
It seems like it'd need to be something like this: sed -n 's/'"\,$1\,"'/&/p'
Am I close? (3 Replies)
does anyone have an awk one-liner to:
print the first line, the second line, then every Nth line, and the last line of a file.
Thanks,
Kenny. (5 Replies)
Hi,
I have a input file with the following entries:
1one
2two
3three
1four
2five
3six
1seven
1eight
1nine
2ten
The output should be
1one
2two
3three
1four
2five
3six (2 Replies)
Hi,
I have a input file with the following entries:
1one
2two
3three
1four
2five
3six
1seven
1eight
1nine
2ten
2eleven
2twelve
1thirteen
2fourteen
The output should be: (5 Replies)
Hi,
For my reuirement, I have to read a file from the 2nd line till the last line<EOF>.
Say,
I have a file as test.txt, which as a header record in the first line followed by records in rest of the lines.
for i in `cat test.txt`
{
echo $i
}
While doing the above loop, I have read... (5 Replies)
can you please tell me
(1) how to delete 1st and 3rd line only from a file.
(2) How to delete last 4 lines in a file that has 2 blank lines out of last 4 lines.
Thank you. (2 Replies)
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
Hi all,
Greetings. I am facing some troubles and hope that the professionals here could help me.
I am handling a large dataset, and part of it is like below:
1 ab139 0 752566 G A
1 ab151 0 846808 T C
1 ab142 0 854250 G A
1 ab061 0 861808 A G
1 ab043 0 873558 T G... (4 Replies)
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT DEBIAN
dmtxquery
DMTXREAD(1) General Commands Manual DMTXREAD(1)NAME
dmtxquery - extract information from dmtxread output
SYNOPSIS
dmtxquery PROPERTY [OPTION]... [FILE]...
DESCRIPTION
dmtxquery extracts information from the XML output from dmtxread for individual or grouped barcode scan results.
PROPERTY
barcode.count count of all barcodes found in image
barcode.N.BPROP print BPROP property of Nth barcode
message.count count of all messages found in image
message.N.MPROP print MPROP property of Nth message
message.N.barcode.count count of all barcodes in Nth message
message.N.barcode.M Mth barcode of Nth message, print all
message.N.barcode.M.BPROP Mth barcode of Nth message, print BPROP
BPROP barcode properties:
message message_number message_position
matrix_size data_codewords error_codewords
rotation data_regions_count interleaved_blocks
MPROP message properties:
message data_codeword error_codeword
OPTIONS -V, --version
Print program version information.
--help Display this help message and quit.
STANDARDS
ISO/IEC 16022:2000
ANSI/AIM BC11 ISS
BUGS
Email bug reports to mike@dragonflylogic.com
AUTHOR
Copyright (C) 2008, 2009 Mike Laughton
September 4, 2009 DMTXREAD(1)