My String variable is holding value as - abc"def
I want to replce " with \"
I tried with awk :
echo $var | awk '{gsub(/"/,"\"");print}'
and I am getting an error, `)' is not expected. (1 Reply)
Hi guys,
i have a pattern that i am searching in a file and i want to extract some of this pattern
...
module TS1N65ULPA96X32M4 (
....
i want to extract only TS1N65ULPA96X32M4 part and i do the following
sed 's/module \(x*\).*/\1/' name_of_file
but this is not quite right.
could... (6 Replies)
Hi all
I need to replace all characters in a file except for the matching pattern
eg.
I need to replace all character with '*' except for the pattern "abc"
Input
"sdfhgsdf abc ##%$#abcsdfh sdfjkfff"
Output
"******abc******abc*************"
Request for single liner solution (1 Reply)
Hi all,
I been searching the forum for a few hours now and can't find exactly what I need to replace text between two patterns. Below is what I want to accomplish
/* Any text between these to sympols */
changed to....
/* This will be the new text to change */
..and I'm... (3 Replies)
Hi,
I have a file which contains the below data. I want to change pattern to correct format.
# tail -1 test.log | awk '{print $8}'
10/09/23
#
I want the format to be 23/09/10 (5 Replies)
Hi All
I am having pipe seperated inputs like
Adam|PeteR|Josh|PEter
Nick|Rave|Simon|Paul
Steve|smith|PETER|Josh
Andrew|Daniel|StAlin|peter
Rick|PETer|ADam|RAVE
i want to repleace all the occurrence of peter (in any case pattern PeteR,PEter,PETER,peter,PETer) with Peter so that output... (5 Replies)
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
Hi,
I have a text file with lots of text (strings,numbers,special characters etc). I am trying to replace any occurrence of these strings :
90%
91%
92%
....
100%
I want to replace them with :
"90%"
"91%"
"92%"
....
"100%"
I am now using 10 sed commands for replacement but I... (12 Replies)
Discussion started by: ctrld
12 Replies
LEARN ABOUT DEBIAN
xnbd-bgctl
XNBD-BGCTL(1) General Commands Manual XNBD-BGCTL(1)NAME
xnbd-bgctl -- Control a server running xnbd-server(8) through its control socket
SYNOPSIS
xnbd-bgctl [--cache-all] [--cache-all2] [--query] [--reconnect REMOTE_HOST REMOTE_PORT] [--shutdown] [control_socket]
DESCRIPTION
With the xmbd-bgctl command you can connect to a xnbd-server control channel and instruct it to act as directed. You may pass an argument
to the control program which is then forwarded, on your behalf, to the server instance.
OPTIONS
The following options are supported:
--cache-all
If the remote xnbd-server acts as proxy server, this command intstructs the controlling xnbd-server instance to cache all blocks
on its associated block disk. Upon completion the controlled xnbd instance holds all data from the origin instance and it is no
longer necessary to act as proxy.
--cache-all2
This command is identical to cache-all but detaches the process from the terminal and is hence using a dedicated connection for
data transfer.
--query This command retrieves completion statistics from the proxy server instance. It returns the number of cached blocks on the
server.
--reconnect
This command recovers from a lost connection by re-establishing connectivity with the origin server. This command expects two
additional arguments, the REMOTE_HOST, and the REMOTE_PORT you want to connect to, to recover from a disconnected session.
--shutdown
This command stops the proxy server and restarts the target server. All client sessions are preserved.
POSITIONAL ARGUMENTS
The following positional options are supported:
CONTROL_SOCKET
The Unix domain socket, the xnbd-server(8) program is listening on.
SEE ALSO
xnbd-server (8).
AUTHOR
The NBD kernel module and the NBD tools have been written by Pavel Macheck (pavel@ucw.cz) and is now maintained by Paul Clements.
(Paul.Clements@steeleye.com).
The xNBD userland (client and server) have been written by Takahiro Hirofuchi (t.hirofuchi@aist.go.jp)
This manual page was written by Arno Toell (debian@toell.net) for the Debian GNU/Linux system (but 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 2, as published by the
Free Software Foundation.
XNBD-BGCTL(1)