Sponsored Content
Top Forums Shell Programming and Scripting Update config file using shell script in Solaris 5.10 Post 302891129 by ravidwivedi2288 on Tuesday 4th of March 2014 04:14:45 AM
Old 03-04-2014
thanks for you reply Don,

it would be the date which is mentioned in the file below is how my config.txt file is

config.txt
---------------
Code:
ORACLE_HOME=/opt2/oracle/productc/11.2.0/dbhome_1
ORACLE_BASE=/opt2/oracle/productc/11.2.0/dbhome_1
START_DATE=31-12-2013
END_DATE=31-01-2014
PERIOD=10
FLAG=A
MAX_SIZE=1
LAST_FEED=N
SEQUENCE=1

the above is how the config.txt file is , we would read the START_DATE value from config.txt via scripting and store the same in variable
(example
Code:
START_RUN_DATE=`cat $CONFIG_FILE | grep START_DATE=|cut -f2 -d'='`
PERIOD=`cat $CONFIG_FILE | grep PERIOD=|cut -f2 -d'=' | head -1`   )

after reading this above value we need sum up like

example if
START_DATE=04-03-2014
PERIOD=10

result should be as 14-03-2014

---------- Post updated at 04:14 AM ---------- Previous update was at 04:01 AM ----------

forgot to update on GNU and Shell which we are using on my last post

we don't have GNU utility installed and we cannot install the same in our live environment
and we are using SunOS 5.10 Generic_147440-07 sun4v sparc sun4v

thanks

Last edited by Scrutinizer; 03-04-2014 at 05:06 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to parse config variables from external file to shell script

How do i use a config.txt to recursively pass a set of variables to a shell script eg my config.txt looks like this : path=c://dataset/set1 v1= a.bin v2= b.bin path=c://dataset/set2 v1= xy.bin v2= abc.bin .................. and so on . and my testscript : (2 Replies)
Discussion started by: pradsh
2 Replies

2. Shell Programming and Scripting

Edit a config file using shell script

I need to edit a config file using shell script. i.e., Search with the 'key' string and edit the 'value'. For eg: below is what I have in the config file "configfile.cfg". Key1=OldValue1 Key2=OldValue2 I want to search for "Key1" and change "OldValue1" to "NewValue1" Thanks for your... (7 Replies)
Discussion started by: rajeshomallur
7 Replies

3. UNIX for Dummies Questions & Answers

update records in a file using shell script...

Hi, I have a file with 6 columns. First 3 columns together make unique record. I have a variable ($v) which hold a value that is obtained by a caliculaion. I have to replace value in 5th columnn with the value of the variable ($v). The value $v is caliculated from col4 and col6 values. ... (2 Replies)
Discussion started by: new_learner
2 Replies

4. Shell Programming and Scripting

how to access variables in a config file inside a shell script

I'm writing a shell script. I want to put the variables in a separate config files and use those inside my script. e.g. the config file (temp.conf)will have the values like mapping=123 file_name=xyz.txt I want to access these variables in temp.conf(i.e. mapping and file_name) from inside the... (7 Replies)
Discussion started by: badrimohanty
7 Replies

5. UNIX and Linux Applications

Autosys Config file update on a read-only filer

Hi To All Genius out there, We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access. Our Autosys environment is on a dual server... (0 Replies)
Discussion started by: whn_chips_r_dwn
0 Replies

6. Solaris

Autosys Config file update on a read-only filer

Hi To All Genius out there, We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access. Our Autosys environment is on a dual server mode(Active... (0 Replies)
Discussion started by: whn_chips_r_dwn
0 Replies

7. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

8. Shell Programming and Scripting

How to update an entry of another file in a Shell script?

Hi all, Say I have a shell script called update_password.sh - in this script I want to perform a task to update a specified entry of another file (e.g. users.passpords) update_password.sh #!/bin/bash -e PW_FILE_DIR="${A_DIR}/.../..." PW_FILE="users.passwords" I want to update the... (2 Replies)
Discussion started by: isaacniu
2 Replies

9. Shell Programming and Scripting

Script to detect dynamic ip change and update to config file

Hi All, I am newbie here and request your assistance. I have a service running on public ip, but since I have a dynamic IP it keeps on changing and every time I need to manually get the new ip and add to the config file and restart the service. This has become bit time consuming. Hence, I... (4 Replies)
Discussion started by: Shaan_Shaan
4 Replies

10. Shell Programming and Scripting

Shell script to pass the config file lines as variable on the respective called function on a script

I want to make a config file which contain all the paths. i want to read the config file line by line and pass as an argument on my below function. Replace all the path with reading config path line by line and pass in respective functions. how can i achieve that? Kindly guide. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
FLARE(6)							 flare User Manual							  FLARE(6)

NAME
flare - diablo like rpg game DESCRIPTION
This manual page documents briefly the game flare and the files it uses. flare is a diablo like rpg game. FILES
settings.txt flare does not have a settings dialogue yet. You can manipulate flare's settings in the settings.txt instead. It is located in one of the following paths: $XDG_CONFIG_HOME/flare $HOME/.config/flare ./config keybindings.txt You can manipulate flare's default key bindings in this file. It is located in one of the following paths: $XDG_CONFIG_HOME/flare $HOME/.config/flare ./config save[0-9]{?}.txt Savegames are simple txt files in flare. You can find them at one of these places: $XDG_DATA_HOME/flare $HOME/.local/share/flare ./saves If permissions are correct, the game is automatically saved when you exit. ENVIONMENT
XDG_CONFIG_HOME, $XDG_DATA_HOME flare follows the XDG stanard, see FILES section above. BUGS
If you should find a bug in flare, please report it at the official BTS at: https://github.com/clintbellanger/flare/issues. AUTHOR
Jan-Hendrik Peters <hennr@hennr.name> Wrote this manpage for the Debian system. COPYRIGHT
Copyright (C) 2011 Jan-Hendrik Peters This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. flare 12/26/2011 FLARE(6)
All times are GMT -4. The time now is 12:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy