Hi,
I want to match a line which exists in a file. I have written a test script similar to below -
The content of the file file.txt would be like this -
But, my issue is that I will be getting the file contents in the code inside a variable in a while loop. i.e. like file="/usr/bin/7897.xcf". So, now, do I have to decompose this content at runtime to pass it to sed ?
I need to replace the line containing "STAGE_DB" with the line
"STAGE_DB $DB # database that contains the table being loaded ($workingDB)"
Here $DB is passed during the runtime.
How can I do this?
Thanks,
Kousikan (2 Replies)
Please help!
Input pattern, where ... could be any number of lines
struct A {
Blah1
Blah2
Blah3
...
} B;
output pattern
struct AB {
Blah1
Blah2
Blah3
...
};
I need help in extracting everything between { and }
if it would have been on a single line { \(.*\)} should have worked. (15 Replies)
I am searching a dhcpd.conf to find the hardware ethernet match, then once the match is found delete just the line above it. For example:
testmachine.example {
hardware ethernet 00:00:00:00:00:00;
fixed address 192.168.1.100;
next-server 192.168.1.101;
filename "linux-install/pxelinux.0";
}... (3 Replies)
the following range matching works great but i wish to add a blank line after each range result set... which i've tried and researched to no avail
MY INPUT DATA:
CURRENT CODE I'M USING:
sed -n '/*$/,/;/p' $INPUT_FILE
RESULTS I'M GETTING:
RESULT I looking to... (5 Replies)
New to sed...
Have a file foo.txt (below).
Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique).
So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line.
What I have thus far:
sed -e... (6 Replies)
Hello,
I want to do a simple substitution using sed but I can't find a solution. Basically, from a Apache conf file, I would like to remove everything included between the <VirtualHost> and </VirtualHost> e.g
SSLMutex file:/var/run/ssl_mutex
<VirtualHost _default_:443>
# A lot of config that... (5 Replies)
Hi How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
not getting anywhere with this
an xml file contains multiple clients set up with same tags, different values.
I need to parse the file for client foo, and change the value of tag "64bit" from false to true.
cat clients.xml
<Client type"FIX">
<ClientName>foo</ClientName>... (3 Replies)
GIMP-REMOTE(1) GIMP Manual Pages GIMP-REMOTE(1)NAME
gimp-remote - tells a running GIMP to open a (local or remote) image file.
SYNOPSIS
gimp-remote [-h] [--help] [-v] [--version] [--display display] [-e] [--existing] [-q] [--query] filename ...
DESCRIPTION
gimp-remote is a small utility that tells a running GIMP to open one or more (local or remote) image files. It does so by searching for a
GIMP toolbox on the active display. If it can find a GIMP toolbox, a synthetic drop event is created which makes GIMP think the files
would have been dropped onto the toolbox. More than one filename or URL can be specified on the commandline.
If no GIMP window is found, gimp-remote will start a new GIMP instance and ask it to load the specified images. If no filename or URL is
given, gimp-remote will start a new GIMP. This behaviour can be altered using the command-line options described below.
OPTIONS
gimp-remote accepts the following options:
-h, --help
Display a list of all commandline options.
-v, --version
Output the version info.
--display display
Use the designated X display.
-e, --existing
If no running GIMP instance is found, don't start a new one but exit.
-q, --query
Check if GIMP is running and exit. A status code of 0 indicates that a GIMP toolbox window has been found on this display.
EXAMPLES
gimp-remote http://www.gimp.org/images/wilber_the_gimp.png
Loads the image from the GIMP website into a running GIMP or starts a new one.
gimp-remote wilber.xcf wilma.xcf
Loads the local files wilber.xcf and wilma.xcf into a running GIMP or starts a new one.
ENVIRONMENT
DISPLAY to get the default host and display number.
AUTHORS
Sven Neumann and Simon Budig.
SEE ALSO gimp(1), gimprc(5), gimptool(1)Version 2.0.2 March 23 2004 GIMP-REMOTE(1)