02-05-2008
Finding a word in a file
Hi frndz,
i have a flat file like,
xxx yyy zzz sss aaa bbb yyy xxx rrr sss ttt yyy ddd zzzz cccc..
look, in this file i want to fetch the substring from one yyy to another one and need to print it then from next values between yyy's..
can you please give me some inputs on this..
Thanks in advance,
- Raja.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am looking for a way to find a particular word in a file then print a line that precedes this line, as well as this line.
Sometimes in a log file there is only one word per line and I need to print one of the lines leading up to the single worded line.
Example - I can grep for ouch... (5 Replies)
Discussion started by: g_jumpin
5 Replies
2. Shell Programming and Scripting
Hi,
I need to check if a particular name is already in the file or not and i am using following code for this...
match=$(grep -n -e "$output1" outputfiles.txt )
where output1 is the variable name having names in it and outputfiles.txt is the file name ..and i am using ksh
can anybosy... (6 Replies)
Discussion started by: manmeet
6 Replies
3. Shell Programming and Scripting
suppose i have this line
abs|der|gt|dftnrk|dtre
i want to count the number of "|" in this line..
how can i do that.
plz help:confused: (9 Replies)
Discussion started by: priyanka3006
9 Replies
4. Shell Programming and Scripting
Hi All ,
I have different strings (SQL queries infact) of different lengths such as:
1. "SELECT XYZ FROM ABC WHERE ABC.DEF='123' "
2. "DELETE FROM ABC WHERE ABC.DEF='567'"
3. "SELECT * FROM ABC"
I need to find out the word coming after the... (1 Reply)
Discussion started by: swapnil.nawale
1 Replies
5. Emergency UNIX and Linux Support
Hi All,
I have a requirement as below
I need find for a string in a log file and once i found that string i need to send a mail.Thsi can be done thru grep and mailx cmnd.
Here once i found the string i need to send last 50 lines(up) from where string found.
Actually they require to find... (9 Replies)
Discussion started by: pssandeep
9 Replies
6. Shell Programming and Scripting
Hi,
I am trying to develop a script which should find a word if a particular word exists.
Below is the content of the file.
insert_job: test_job ----> job name
days_of_week: all
start_times: "16:00"
date_conditions: 1
insert_job: test_job2 ----> job name
days_of_week: all... (16 Replies)
Discussion started by: rpatty
16 Replies
7. Shell Programming and Scripting
i want to find the no:of occurrences of a word in a file
cat 1.txt
unix script unix script
unix script unix script unix script unix script
unix script unix script unix
unix
script
unix script unix script now i want to find , how many times 'unix' was occurred
please help me
thanks... (6 Replies)
Discussion started by: mahesh1987
6 Replies
8. Shell Programming and Scripting
Dear All,
assume that we have a text file or a folder of files,
I want to find this pattern followers*.csv in the text file , and get * as the output.
There are different matches and * means every character.
Thank you in advance.
Best,
David (1 Reply)
Discussion started by: davidfreed
1 Replies
9. Shell Programming and Scripting
Hello,
in a AIX system : AIX CDRATE01 2 7 00FAB3114C00
my following commande give the result :
LISTE /tmp/RESS
****************************************************************
Liste
TYPE = XXXXXXX
EX = YYYY
VER ... (13 Replies)
Discussion started by: sam01
13 Replies
10. UNIX for Beginners Questions & Answers
I have a text file that has some data like:
PADHOGOA1 IOP055_VINREG5_1 ( .IO(VINREG5_1), .MONI(), .MON_D(px_IOP055_VINREG5_1_MON_D), .R0T(px_IOP054_VINREG5_0_R0T), .IO1() );
PADV30MA0 IOP056_VOUT3_IN ( .IO(VOUT3_IN), .V30M(px_IOP056_VOUT3_IN_V30M));
PADV30MA0 IOP057_VOUT3_OUT (... (2 Replies)
Discussion started by: utkarshkhanna44
2 Replies
LEARN ABOUT DEBIAN
xdriver
xdriver(1grass) Grass User's Manual xdriver(1grass)
NAME
XDRIVER - GRASS Monitor - driver to display GRASS maps in X11 environment.
(drivers)
DESCRIPTION
The GRASS XDRIVER can be used to display GRASS maps in X11 environment.
Usage in details
Variables:
GRASS_WIDTH
set the x size in pixel for the XDRIVER (default: 640)
GRASS_HEIGHT
set the y size in pixel for the XDRIVER (default: 480)
XDRIVER_TRUECOLOR=[TRUE|FALSE]
Look for a TrueColor visual (?)
XDRIVER_WINDOW
?
XDRIVER_PRIVATE_CMAP
Private color map (?)
XDRIVER_LEFT
defines the left position of GRASS monitor (removed?)
XDRIVER_TOP
define the upper position of GRASS monitor (removed?)
Set the XDRIVER size
# bash shell syntax:
export GRASS_WIDTH=xxx
export GRASS_HEIGHT=yyy
# c shell syntax:
setenv GRASS_WIDTH xxx
setenv GRASS_HEIGHT yyy
To control the XDRIVER, use the d.mon module.
The maximum color depth depends on the current X Server settings.
SEE ALSO
Display drivers
HTMLMAP driver, PNG driver, PostScript driver
d.frame, d.mon, g.region d.rast, d.vect
AUTHORS
CERL
various improvements from several authors.
Rewritten 2001 by Glynn Clements
Last changed: $Date: 2008-03-23 15:34:53 +0100 (Sun, 23 Mar 2008) $
Full index
(C) 2003-2011 GRASS Development Team
GRASS 6.4.2 xdriver(1grass)