08-31-2009
It will be good if you show a sample input and desired output???
10 More Discussions You Might Find Interesting
1. Programming
needa c program to extract text between two delimiters from some text file.
and then storing them in to diffrent variables ?
text file like 0:
abc.txt
=========
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass... (7 Replies)
Discussion started by: kukretiabhi13
7 Replies
2. Shell Programming and Scripting
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
Discussion started by: return_user
1 Replies
3. Shell Programming and Scripting
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Discussion started by: DionDeVille
4 Replies
4. Shell Programming and Scripting
Hi.
I have a text test1.txt file like:Receipt
Line1
Line2
Line3
End
Receipt
Line4
Line5
Line6
Canceled
Receipt
Line7
Line8
Line9
End (9 Replies)
Discussion started by: TQ3
9 Replies
5. Shell Programming and Scripting
Hi Guys,
I have a situation wherein I need to extract two lines from below the search string.
Eg.
Current:
$ grep "$(date +'%a %b %e')" alert.log
Mon Apr 12 03:58:10 2010
Mon Apr 12 12:51:48 2010
$
Here I would like the display to be something like
Mon Apr 12... (6 Replies)
Discussion started by: geetap
6 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I need to extract lines between the lines 'RD' and 'QA' from a text file (following). there are more that one of such pattern in the file and I need to extract all of them. however, the number of lines between them is varied in the file. Therefore, I can not just use 'grep -A' command.... (6 Replies)
Discussion started by: johnshembb
6 Replies
7. Shell Programming and Scripting
hi,
i have two files.
file1.sh
echo "unix"
echo "linux"
file2.sh
echo "unix linux forums"
now the output i need is
$./file2.sh
unix linux forums (3 Replies)
Discussion started by: snreddy_gopu
3 Replies
8. Shell Programming and Scripting
I have a text and I want to extract the 4 lines following a keyword!
For example if I have this text and the keyword is AAA
hello
helloo
AAA
one
two
three
four
helloooo
hellooo
I want the output to be
one
two
three
four (7 Replies)
Discussion started by: stekanius
7 Replies
9. Shell Programming and Scripting
I have some files containing the following data
# RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->O O-->H-N N-H-->O O-->H-N TCO KAPPA ALPHA PHI PSI X-CA Y-CA Z-CA
1 196 A M 0 0 230 0, 0.0 2,-0.2 0, 0.0 0, 0.0 0.000 360.0 360.0 360.0 76.4 21.7 -6.8 11.3
2 197 A D + 0 0 175 1,-0.1 2,-0.1 0, 0.0 0, 0.0... (10 Replies)
Discussion started by: edweena
10 Replies
10. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
PNGNQ(1) User Manuals PNGNQ(1)
NAME
pngnq - quantize png images
SYNOPSIS
pngnq [-vfhV][-s sample_factor ][-Q dither ][-g gamma ][-e extension ][-d dir ][-n colors ][ inputfiles ]
DESCRIPTION
pngnq quantizes a 32-bit RGBA PNG image to an 8 bit RGBA palette PNG using the neuquant algorithm. The output file name is the input file
name extended with "-nq8.png" or a specified extension.
OPTIONS
-v Verbose mode. Prints status messages.
-f Force overwriting of files.
-s sample factor
Sample factor. The neuquant algorithm samples pixels stepping by this value. The default value of 3 gives good results. Higher val-
ues sample less of the image pixels and thus are faster but less accurate. A factor of 1 samples every image pixel.
-n colors
Specifies the number of colors to quantize to. Defaults to 256 which is the maximum. The minimum here is 2.
-Q dither
Choose a dithering method: n = no dither (default), f = Floyd Steinberg dithering.
-g gamma
Set the image gamma correction. If not present, uses the png file's gamma or defaults to 1.0.
-e extension
Specifies the new filename extension. Defaults to "-nq8.png". Pngnq drops .png from the original filenames. If you set the argument
of the -e option to .png and choose the -f option the input file will be overwritten.
-d dir Tells pngnq to put output files in a directory other than the one the input files are in.
input files
The png files to be processed. Defaults to standard input if not specified. If standard input is being processed the output is sent
to standard output.
-h Print program help.
-V Print version number and library versions.
BUGS
Does not deal correctly with greyscale alpha images with low bit depths, but these wont benefit from quantizing.
AUTHOR
Stuart Coyle <stuart.coyle@gmail.com>
SEE ALSO
png(5)
Linux MAY 2009 PNGNQ(1)