Hi,
I got the issue bit don't know how to fix it.
Actually my file has spaces in front of every line that's why it was not working. When I tried by removing spaces from every line it worked !!! but unfortunately I can not avoid those spaces and has deal with it. Can you please help me ?
Last edited by Scrutinizer; 06-18-2013 at 01:59 PM..
Reason: icode tags changed to code tags
Hi all,
I have some script that creates a temp csv file. What I need to do is do some search and replace and modify the file from my shell script. I know the commands to open the file and then apply the reg ex but wasnt sure how I could do this from a script and modify the file?
Any help... (2 Replies)
hello
have a file1
H87I
Y788O
T347U
J23U
and
file2 J23U U887Y I99U T556U
file3 I99O J99T F557J
file4 N99I T666U R55Y
file5 H87I T347U
file6 H77U R556Y E44T
file7 Y788O K98U H8I
May be using script we can use file1 to search for all the files
and have the output
H87I file5... (3 Replies)
Dear All,
I have a comma-separated file.
1. The first line of the file(header) should have 4 commas(5 fields).
2. The last line of the file should have 1 comma(2 fields).
Pls help me in checking this condition in a shell script.
And the number of lines between the first line and last... (11 Replies)
Hi,
I am having a file which contains as below
Names(aaaa
,bbbb
,cccc
,dddd)
now i want the file to be updated with new value 'eeee' as below
Names(aaaa
,bbbb
,cccc
,dddd
,eeee)
Is there a way to script this ?
Thanks, (5 Replies)
Hi, I am new in unix,
I just want to replace some values from text file according to column numbers. Like, I am having a table as given below:
val1 val2 val3 val4 val5
val6 val7 val8 val9
val10 val11 val12 val13
Now i want... (5 Replies)
I need to remove the entire file contents in file using the shell script.
Actually the grap -v command will create one more file and it occupy the space also.
I need to remove the entire file contents without creating new file using the shell scripting.
Please help me. (5 Replies)
Hello
Has anyone got an example shell script that I can use to compare the contents of two files.
The files should contain the same contents, eg.
file1.txt
apple
pear
grape
file2.txt
apple
pear
grape (2 Replies)
I have a file with the following content:
--------------------
SQL> @DBmonitor_WMHA_SQL_script.sql;
Tablespace Size (GB) Free (GB) % Free % Used
------------------------------ ---------- ---------- ---------- ----------
WMHAIT_IS ... (8 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
Like to have shell script to Read the given file contents into a merged one file with header of path+file name followed by file contents into a single output file.
While reading and merging the file contents into a single file, Like to keep the format of the source file.
... (4 Replies)
Discussion started by: Siva SQL
4 Replies
LEARN ABOUT OPENDARWIN
override_config_file
override_config_file(3alleg4) Allegro manual override_config_file(3alleg4)NAME
override_config_file - Specifies a file containing config overrides. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void override_config_file(const char *filename);
DESCRIPTION
Specifies a file containing config overrides. These settings will be used in addition to the parameters in the main config file, and where
a variable is present in both files this version will take priority. This can be used by application programmers to override some of the
config settings from their code, while still leaving the main config file free for the end user to customise. For example, you could spec-
ify a particular sample frequency and IBK instrument file, but the user could still use an `allegro.cfg' file to specify the port settings
and irq numbers.
The override config file will not only take precedence when reading, but will also be used for storing values. When you are done with using
the override config file, you can call override_config_file with a NULL parameter, so config data will be directly read from the current
config file again.
Note: The override file is completely independent from the current configuration. You can e.g. call set_config_file, and the override file
will still be active. Also the flush_config_file function will only affect the current config file (which can be changed with set_con-
fig_file), never the overriding one specified with this function. The modified override config is written back to disk whenever you call
override_config_file.
Example:
override_config_file("my.cfg");
/* This will read from my.cfg, and if it doesn't find a
* setting, will read from the current config file instead.
*/
language = get_config_string("system", "language", NULL);
/* This will always write to my.cfg, no matter if the
* settings is already present or not.
*/
set_config_string("system", "language", "RU");
/* This forces the changed setting to be written back to
* disk. Else it is written back at the next call to
* override_config_file, or when Allegro shuts down.
*/
override_config_file(NULL);
Note that this function and override_config_data() are mutually exclusive, i.e. calling one will cancel the effects of the other.
SEE ALSO override_config_data(3alleg4), set_config_file(3alleg4)Allegro version 4.4.2 override_config_file(3alleg4)