04-22-2008
hmm the -ow option didnt seem to work. I tried changing the ordering of it too but it didnt return anything at all. Do I need to pipe it or anything?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
When we "grep" for a word in a file, it returns the lines containing the word that we searched for. Is there a way to display only the words and not the entire line containing them.
Thanks
Ananth (6 Replies)
Discussion started by: ananthmm
6 Replies
2. UNIX for Dummies Questions & Answers
hi, consider the below line in a text file,
'Y',getdate(),'N','V',NULL .....
'N',getdate(),'Y','D',NULL .....
'Y','N','Y',getdate(),'Y','D',NULL ....
as u see above, i want only the second word after the getdate() word...
getdate() will not come 2nd word alwys it may be any position but i... (11 Replies)
Discussion started by: prsam
11 Replies
3. Shell Programming and Scripting
ok, so this is proving to be kind of difficult even though it should not be.
say for instance I want to grep out ONLY the word fkafal from the below output, how do I do it?
echo ajfjf fjfjf iafjga fkafal foeref afoafahfia | grep -w "fkafal"
If i run the above command, i get back all the... (4 Replies)
Discussion started by: SkySmart
4 Replies
4. Shell Programming and Scripting
HI,
Let us a consider i have a file as following.
abcde (flag5 / 234 ) Mod 45 efgh
afghd (flag3/ 343) MOD 34 ghdd
tryd (t_flag6/ 567 ) MOD 43 uifudiu
Is there a way where I need only the flag and the calculation done on it.
The output should be :
(flag5 / 234 ) Mod 45 ... (8 Replies)
Discussion started by: ashwin3086
8 Replies
5. Shell Programming and Scripting
Hi,
I have input file as below. Can you help me?
inac_4y;0;2;Balance;200;1;1;
0;2;Balance;100;1;
0;inac_nq;0;1;Balance;100;1
desired output
Balance;200
Balance;100
Balance;100
-Suresh
Please use and tags when posting code, data or logs etc. to preserve formatting... (5 Replies)
Discussion started by: suresh3566
5 Replies
6. Shell Programming and Scripting
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
Discussion started by: linuxadmin
2 Replies
7. Shell Programming and Scripting
Hi
can we grep for a word and print the next word of the greped word?
ex:- create or replace function function_name
create function function_name
we should search for word "function" and output next word "function_name" from both lines. (3 Replies)
Discussion started by: manasa_vs
3 Replies
8. Shell Programming and Scripting
so far I have the following , it work,
if grep -w "Hi"\|"Hello" /home/my.log 2>&1 > /dev/null
then
EMAIL_ADDR="aaa@gmail.com"
echo "Please view the error messages on attached file " | mutt -a ~/error_report.txt -s "hi `date +"%d-%m-%Y"`" "$EMAIL_ADDR"
fi
But :(I want to add if... (6 Replies)
Discussion started by: Hscript
6 Replies
9. Shell Programming and Scripting
Hi,
Below is an example :
ST1 PREF: int1 AVAIL: int2
ST2 PREF :int1 AVAIL: int2
I need int1 to come in preferred variable while programming and int2 in available variable
Please help me doing so
Best regards,
Vishal (10 Replies)
Discussion started by: Vishal_dba
10 Replies
10. Shell Programming and Scripting
I have a file "test" with following contents:
cat test
abc
abcd_efg
abc_abc
I want to only grep for abc or abc_ without getting other results, how do I achieve this?
If I use grep -w abc test option I get only abc and not abc_.
If I use egrep "abc|abc_" test its still printing... (3 Replies)
Discussion started by: ctrld
3 Replies
LEARN ABOUT OPENDARWIN
fixup_datafile
fixup_datafile(3alleg4) Allegro manual fixup_datafile(3alleg4)
NAME
fixup_datafile - Fixes truecolor images in compiled datafiles. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void fixup_datafile(DATAFILE *data);
DESCRIPTION
If you are using compiled datafiles (produced by the dat2s and dat2c utilities) on a platform that doesn't support constructors (currently
any non GCC-based platform), or if the datafiles contain truecolor images, you must call this function once after your set the video mode
that you will be using. This will ensure the datafiles are properly initialised in the first case and convert the color values into the
appropriate format in the second case. It handles flipping between RGB and BGR formats, and converting between different color depths when-
ever that can be done without changing the size of the image (ie. changing 15<->16-bit hicolor for both bitmaps and RLE sprites, and
24<->32-bit truecolor for RLE sprites).
Note that you can only call this once and expect it to work correctly, because after the call the DATAFILE you fixed up is permanently con-
verted to whatever is the current component ordering for your screen mode. If you call fixup_datafile again, the function assumes you have
a freshly loaded datafile. It cannot "undo" the previous conversion.
If your program supports changing resolution and/or color depth during runtime, you have two choices: either call fixup_datafile() just
once and hope that the component ordering and bit depth doesn't change when the screen mode changes (unlikely). Or, you can reload your
datafiles when the screen mode changes.
SEE ALSO
set_gfx_mode(3alleg4), set_color_conversion(3alleg4)
Allegro version 4.4.2 fixup_datafile(3alleg4)