01-25-2011
Quote:
Originally Posted by
Corona688
It is always helpful to know what system you're on, so getting in the habit of posting it would be good so we don't have to ask...
grep -m makes starting at a certain point easy but AIX and Solaris may not have it.
uname -a gives:
Linux 2.6.18-194.21.1.e15 x86_64 GNU/LINUX
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to extract a particular block from a file whose locations are not known but the only identity is a word. For example
in a file I have
ABC
asdklf
asdfk
FGH
dfdfg
asdlfk
asdfl
...
JHK (5 Replies)
Discussion started by: sskb
5 Replies
2. 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
3. Shell Programming and Scripting
I executed a following sed command
=> echo "a/b/c/d/e/f/g/h" | sed 's/\/*$//g'
a/b/c/d/e/f/g
Now what if I want to extract "g" from "a/b/c/d/e/f/g/h" . That is second last string using SED. (4 Replies)
Discussion started by: Shell_Learner
4 Replies
4. Shell Programming and Scripting
Hi , this is my first enty in our forum.
Problem scenario:
Using informatica tool am loding records from source DB to target DB. While loading some records getting rejected due to some reason. Informatica will capture those rejected records in session log file.now the session log ll be... (2 Replies)
Discussion started by: Gopal_Engg
2 Replies
5. Shell Programming and Scripting
Hi all,
my problem is extract a value from a text, i mean, I have this text:
> ala
Nr of active alarms are: 16
================================================================================================
Sever Specific Problem Cause Mo-Reference... (15 Replies)
Discussion started by: marimovo
15 Replies
6. Shell Programming and Scripting
Hi,
There's an xml file produced from a front-end tool as shown below:
<INPUT DATABASE ="ORACLE" DBNAME ="UNIX" NAME ="FACT_TABLE" OWNERNAME ="DIPS">
<INPUTFIELD DATATYPE ="double" DEFAULTVALUE ="" DESCRIPTION ="" NAME ="STORE_KEY" PICTURETEXT ="" PORTTYPE ="INPUT" PRECISION ="15" SCALE... (6 Replies)
Discussion started by: dips_ag
6 Replies
7. Shell Programming and Scripting
Hi,
I have some CVS log files, which are divided into blocks. Each block has many fields of information and I want to extract those blocks with a pattern. Here is the sample input.
RCS file: /cvsroot/eclipse/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java,v
head: 1.174... (7 Replies)
Discussion started by: sandeepk1611
7 Replies
8. Shell Programming and Scripting
I have siebel log file as following
EventContext .......
123
.......
SELECT
...
..
EventConext <---- Question 1 , I should get this line
345
......
SELECT <----- Question 2 , print this line
Test..... <----- Question 2 , print this line
.... <----- Question 2 , print... (5 Replies)
Discussion started by: ran123
5 Replies
9. Shell Programming and Scripting
Hei buddies,
Need ur help once again.
I have a file which has bunch of lines which starts from a fixed pattern and ends with another fixed pattern.
I want to make use of these fixed starting and ending patterns to select the bunch, one at a time.
The input file is as follows.
Hi welcome... (12 Replies)
Discussion started by: anushree.a
12 Replies
10. Shell Programming and Scripting
Hello all,
I am working on a script which should parse a large file called input.txt which contains table definitions, index definitions and comments like these ones:
------------------------------------------------
-- DDL Statements for table "CMWSYS"."CMWD_TEC_SUIVI_TRT"... (12 Replies)
Discussion started by: kiki_riki_miki
12 Replies
LEARN ABOUT SUSE
wrjpgcom
WRJPGCOM(1) General Commands Manual WRJPGCOM(1)
NAME
wrjpgcom - insert text comments into a JPEG file
SYNOPSIS
wrjpgcom [ -replace ] [ -comment text ] [ -cfile name ] [ filename ]
DESCRIPTION
wrjpgcom reads the named JPEG/JFIF file, or the standard input if no file is named, and generates a new JPEG/JFIF file on standard output.
A comment block is added to the file.
The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. Although the standard doesn't actually define what COM blocks
are for, they are widely used to hold user-supplied text strings. This lets you add annotations, titles, index terms, etc to your JPEG
files, and later retrieve them as text. COM blocks do not interfere with the image stored in the JPEG file. The maximum size of a COM
block is 64K, but you can have as many of them as you like in one JPEG file.
wrjpgcom adds a COM block, containing text you provide, to a JPEG file. Ordinarily, the COM block is added after any existing COM blocks;
but you can delete the old COM blocks if you wish.
OPTIONS
Switch names may be abbreviated, and are not case sensitive.
-replace
Delete any existing COM blocks from the file.
-comment text
Supply text for new COM block on command line.
-cfile name
Read text for new COM block from named file.
If you have only one line of comment text to add, you can provide it on the command line with -comment. The comment text must be sur-
rounded with quotes so that it is treated as a single argument. Longer comments can be read from a text file.
If you give neither -comment nor -cfile, then wrjpgcom will read the comment text from standard input. (In this case an input image file
name MUST be supplied, so that the source JPEG file comes from somewhere else.) You can enter multiple lines, up to 64KB worth. Type an
end-of-file indicator (usually control-D) to terminate the comment text entry.
wrjpgcom will not add a COM block if the provided comment string is empty. Therefore -replace -comment "" can be used to delete all COM
blocks from a file.
EXAMPLES
Add a short comment to in.jpg, producing out.jpg:
wrjpgcom -c "View of my back yard" in.jpg > out.jpg
Attach a long comment previously stored in comment.txt:
wrjpgcom in.jpg < comment.txt > out.jpg
or equivalently
wrjpgcom -cfile comment.txt < in.jpg > out.jpg
SEE ALSO
cjpeg(1), djpeg(1), jpegtran(1), rdjpgcom(1)
AUTHOR
Independent JPEG Group
15 June 1995 WRJPGCOM(1)