Hi
I have an XML file with strings XABCD, XEFGHX and XIJKLX. I would like to replace XABCDX with "This is the first string", XEFGHX with "This is the second string" and XIJKLX with "This is the third string".
What is the best way to implement this? Should I have a file with the data that is... (4 Replies)
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Hi,
How can i execute the below. I want to replace value1 string value with new/new/newString value
sed 's/value1/new/new/newString'/' file.txt
~Vinodh' Kumar (2 Replies)
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
I have this file and variable on my machine
$cat /tmp/disk.tmp
check_disk.pl -H localhost -D ARG1 -w 75 -c 90
$echo $_ARG1
/,/opt,/tmp,/usr,/var,/boot,/dev/shm
how do I replace the string ARG1 in my file (disk.tmp) with the value of my variable _ARG1 and placing them inside quotes while... (4 Replies)
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
Hello guys,
I'm working in a cellular company and i'm trying to do a script to run some commands automaticlly.
I'm using Solaris version :SunOS pk-ercuas4 5.10 in my work. I've a file that creates by script named test1.mos that that look like:
confb+
gsg+
lt all
$date = `date... (1 Reply)
Discussion started by: oferg
1 Replies
LEARN ABOUT CENTOS
amservice
AMSERVICE(8) System Administration Commands AMSERVICE(8)NAME
amservice - run an amanda service on a client
SYNOPSIS
amservice [-f input_file [-s]] [-o configoption...] hostname auth service
DESCRIPTION
Amservice execute an Amanda service on a client. It can be used without amanda server configuration (amanda.conf and disklist). It can be
used to check communication between a server and a client. Amservice reads stdin to capture the REQ packet to send to the client.
See the amanda(8) man page for more details about Amanda.
OPTIONS
hostname
The hostname of the client.
auth
The auth to use, one of: bsd, bsdudp, bsdtcp, ssh, rsh or krb5. The client must be configured with this auth.
service
The amanda service to execute on the client. One of noop, selfcheck or sendsize.
-f input_file
Use the file input_file instead of stdin to read the REQ packet from.
-s
Redirect the first connected stream to stdin/stdout. The -f argument is required for the REQ packet, the REP packet is not printed on
stdout.
-o configoption
See the "CONFIGURATION OVERRIDE" section in amanda(8).
EXAMPLE
The noop service is easy to execute because it does not require a REQ packet:
amservice hostname bsdtcp noop < /dev/null
The example executes the noop service on the client using bsdtcp auth. This is useful for debugging connection problems. It print an
OPTIONS line upon success.
It is more difficult to execute the selfcheck or sendsize service, as these require a valid REQ packet. If you have already uccessfully run
amanda, you can find valid REQ packets in the amandad.*.debug files.
EXIT CODE
The exit code of amservice is one of:
0 = success
1 = error executing amandad on the client.
As amservice doesn't parse the REP packet, it can only detect failures in executing amandad on the client. amservice can exit with value 0
even if the user is not authorized to execute the service. An error message will be printed.
SEE ALSO amanda(8), amanda(8), amcheck(8), amdump(8), amadmin(8)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHOR
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 AMSERVICE(8)