Sponsored Content
Top Forums Shell Programming and Scripting Calling Config file in the Script.. Please help Post 302445272 by frans on Sunday 15th of August 2010 02:11:32 AM
Old 08-15-2010
Posting your script (by changing some parameters for privacy) would be very helpful Smilie
 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Advanced & Expert Users

Calling sql file from shell script

Hi I have a shell script that call a sql file. The sql file will create a spool file. My requirement is, when ever i get an OS error like file not found. I have to log it in a log file. Could some who worked in a like scenario help me by giving the code sample. Many Thanks.. (1 Reply)
Discussion started by: chintapalli001
1 Replies

3. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

4. Shell Programming and Scripting

need help with calling a config file in script

Hi, I am writting a script and i am using SYBASE database. i have a config file with my logging credentials. when i am calling the file via isql command its throwing me an error. see the below code. while read line do SERVER=`echo $linea |awk -F"|" ' {print $1} ' ` ... (6 Replies)
Discussion started by: dazdseg
6 Replies

5. 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

6. Shell Programming and Scripting

bash script config file

hi all config.sh : dhcp="0" setip="1" telnet="1" ping="1" main.sh function dhcp { } function setip { } (1 Reply)
Discussion started by: sadosan83
1 Replies

7. Shell Programming and Scripting

Config file edition by script

Hello. I am looking for a simple way to modify config files after a first install. I have a file containing the good key=value good_config.txt SSHAuthorizedKeys="authorized_keys" SSHD_PORT=54321 ENABLE_PASSDB_AUTHENTICATION="0" ENABLE_SSH_AUTHENTICATION="1" ENABLE_SU_AUTHENTICATION="0"... (3 Replies)
Discussion started by: jcdole
3 Replies

8. Shell Programming and Scripting

Calling a text file while executing a script

hi, I am trying to call a text file in a shell script. The text file has the variable defind like.. export vari_namee=/path/give/here ------------------------------------------------- I am able to execute the shell script through putty. But when I try to execute with informatica... (1 Reply)
Discussion started by: sunil0106
1 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Pass config file to bash script

I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source config using ., if I understand correctly the variables in the config file can now be used by the... (11 Replies)
Discussion started by: cmccabe
11 Replies
FENCE_AGENT(8)						      System Manager's Manual						    FENCE_AGENT(8)

NAME
fence_apc_snmp - Fence agent for APC over SNMP DESCRIPTION
fence_apc_snmp is an I/O Fencing agent which can be used with the APC network power switch. It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1 and v3 with all combinations of authenticity/privacy settings. fence_apc_snmp accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent. fence_apc_snmp can be run by itself with command line options. This is useful for testing and for turning outlets on or off from scripts. Vendor URL: http://www.apc.com PARAMETERS
-a, --ip=[ip] IP Address or Hostname This parameter is always required. -l, --username=[name] Login Name -p, --password=[password] Login password or passphrase -n, --plug=[id] Physical plug number, name of virtual machine or UUID This parameter is always required. -d, --snmp-version=[version] Specifies SNMP version to use (1,2c,3) (Default Value: 1) -c, --community=[community] Set the community string (Default Value: private) -u, --ipport=[port] TCP/UDP port to use for connection with device (Default Value: 161) -4, --inet4-only Forces agent to use IPv4 addresses only -6, --inet6-only Forces agent to use IPv6 addresses only -S, --password-script=[script] Script to retrieve password -b, --snmp-auth-prot=[prot] Set authentication protocol (MD5|SHA) -E, --snmp-sec-level=[level] Set security level (noAuthNoPriv|authNoPriv|authPriv) -B, --snmp-priv-prot=[prot] Set privacy protocol (DES|AES) -P, --snmp-priv-passwd=[pass] Set privacy protocol password -R, --snmp-priv-passwd-script Script to run to retrieve privacy password -o, --action=[action] Fencing Action (Default Value: reboot) -v, --verbose Verbose mode -D, --debug-file=[debugfile] Write debug information to given file -V, --version Display version information and exit -h, --help Display help and exit -C, --separator=[char] Separator for CSV created by operation list (Default Value: ,) --power-timeout=[seconds] Test X seconds for status change after ON/OFF (Default Value: 20) --shell-timeout=[seconds] Wait X seconds for cmd prompt after issuing command (Default Value: 3) --login-timeout=[seconds] Wait X seconds for cmd prompt after login (Default Value: 5) --power-wait=[seconds] Wait X seconds after issuing ON/OFF (Default Value: 0) --delay=[seconds] Wait X seconds before fencing is started (Default Value: 0) --retry-on=[attempts] Count of attempts to retry power on (Default Value: 1) ACTIONS
on Power on machine. off Power off machine. reboot Reboot machine. status This returns the status of the plug/virtual machine. list List available plugs with aliases/virtual machines if there is support for more then one device. Returns N/A otherwise. monitor Check the health of fence device metadata Display the XML metadata describing this resource. STDIN PARAMETERS
ipaddr IP Address or Hostname This parameter is always required. login Login Name passwd Login password or passphrase port Physical plug number, name of virtual machine or UUID This parameter is always required. snmp_version Specifies SNMP version to use (1,2c,3) (Default Value: 1) community Set the community string (Default Value: private) ipport TCP/UDP port to use for connection with device (Default Value: 161) inet4_only Forces agent to use IPv4 addresses only inet6_only Forces agent to use IPv6 addresses only passwd_script Script to retrieve password snmp_auth_prot Set authentication protocol (MD5|SHA) snmp_sec_level Set security level (noAuthNoPriv|authNoPriv|authPriv) snmp_priv_prot Set privacy protocol (DES|AES) snmp_priv_passwd Set privacy protocol password snmp_priv_passwd_script Script to run to retrieve privacy password action Fencing Action (Default Value: reboot) verbose Verbose mode debug Write debug information to given file version Display version information and exit help Display help and exit separator Separator for CSV created by operation list (Default Value: ,) power_timeout Test X seconds for status change after ON/OFF (Default Value: 20) shell_timeout Wait X seconds for cmd prompt after issuing command (Default Value: 3) login_timeout Wait X seconds for cmd prompt after login (Default Value: 5) power_wait Wait X seconds after issuing ON/OFF (Default Value: 0) delay Wait X seconds before fencing is started (Default Value: 0) retry_on Count of attempts to retry power on (Default Value: 1) fence_apc_snmp (Fence Agent) 2009-10-20 FENCE_AGENT(8)
All times are GMT -4. The time now is 05:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy