Sponsored Content
Full Discussion: Edit hibernate config file
Top Forums Shell Programming and Scripting Edit hibernate config file Post 302214060 by Annihilannic on Friday 11th of July 2008 08:52:24 PM
Old 07-11-2008
A sed script along these lines should do the trick:

Code:
sed '
        /hibernate.connection.password/s/>.*</>newpassword</
        /hibernate.connection.url/s/>.*</>http:\/\/newurl:3306\/brokerage</
        /hibernate.connection.username/s/>.*</>newuser</
' originalfile > modifiedfile

Basically it replaces anything between > and < with the new value on the matching line.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl CGI to access / edit "root" owned config files

I am trying to write a CGI program which accesses UNIX configuration files and changes them as required. The thing is, I don't want the CGI program to be "root" owned - it's Perl based! Is there any way that the Perl CGI program can request a username and password - and then use this to... (1 Reply)
Discussion started by: WIntellect
1 Replies

2. AIX

AIX, Hibernate, Java 1.5 website problem

We have an AIX machine running Tomcat 5.0.28 along with Java 1.5. There are two web application on there however when we start Tomcat and unpack the WAR files only one of the sites work. Then if we remove the working site then the other site starts to work. So it appears that one is taking... (0 Replies)
Discussion started by: coaxis
0 Replies

3. Linux

How to enable Hibernate

Hi, I want to enable hibernate in my machine. when i click hibernate option, it is throwing message that hibernate is not enabled in kernel. earlier, i was hibernating in the same machine with windows os. any idea ? Thx in advance. Siva (0 Replies)
Discussion started by: Sivaswami
0 Replies

4. Red Hat

Hibernate in Linux

1) How to enable Hibernate in Linux ? 2) Does compiling kernel from source code alters the current setup of the kernel after implementation Thx in advance, siva. (3 Replies)
Discussion started by: Sivaswami
3 Replies

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

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

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. UNIX for Advanced & Expert Users

Hibernate and Suspend

I have a C++ program which ends up getting run on every conceivable distro. What I can't do in C++, I can do by shelling out to the O/S. I am trying to find a portable way to send the system into hibernate and suspend modes. For users who have pm-utils, of course, I can use that, but I am trying... (4 Replies)
Discussion started by: BrandonShw
4 Replies
SYSTEMD-HIBERNATE-RESUME-GENERATOR(8)                   systemd-hibernate-resume-generator                   SYSTEMD-HIBERNATE-RESUME-GENERATOR(8)

NAME
systemd-hibernate-resume-generator - Unit generator for resume= kernel parameter SYNOPSIS
/lib/systemd/system-generators/systemd-hibernate-resume-generator DESCRIPTION
systemd-hibernate-resume-generator is a generator that instantiates systemd-hibernate-resume@.service(8) unit according to the value of resume= parameter specified on the kernel command line. KERNEL COMMAND LINE
systemd-hibernate-resume-generator understands the following kernel command line parameters: resume= Takes a path to the resume device. Both persistent block device paths like /dev/disk/by-foo/bar and fstab(5)-style specifiers like "FOO=bar" are supported. SEE ALSO
systemd(1), systemd-hibernate-resume@.service(8), kernel-command-line(7) systemd 237 SYSTEMD-HIBERNATE-RESUME-GENERATOR(8)
All times are GMT -4. The time now is 08:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy