I been trying to get this right. I have trying to get rid of spaces in between the character < and the character >. Everytime I try, sed gets too greedy and do the whole line.
Ex.
< T AG 1> Hello, how are you doing?
<Tag 2> I am doing fine.
I want this:
<TAG1> Hello, how are you... (6 Replies)
I want to change a line like
CPM_THRESHOLD 0.8 //
to a new value using sed
I am trying
sed -i "s/CPM_THRESHOLD/CPM_THRESHOLD\t$COH\t\t\/\//" $INPUT_4
but how can i substitute the whole line begining with CPM_THRESHOLD and substitute it? (2 Replies)
Hello
I have a document and in this document I have several occurrence of "VAR == xxxxxxx" and xxxxx can be anything. I don't know what it is. I want to replace the 'xxxxx's with something I know.
What I know however, is the line numbers of the VAR =='s in the file.
How can I replace... (1 Reply)
I am looking to change a data file into a javascript string and this is the code that I am using:
sed -i '' -e 's/^/str += "/' -e 's/$/";/' file.xml
The first part
-e 's/^/str += "/'
works as intended, but the second part
-e 's/$/";/'
adds an additional newline to my file, so that instead of... (3 Replies)
Greetings everyone. Right now I am working on a script to be used during automated deployment of servers. What I have to do is remove localhost.localdomain and localhost6.localdomain6 from the /etc/hosts file. Simple, right? Except most of the examples I've found using sed want to delete the entire... (4 Replies)
hi all,
I am having trouble finding the right string for this - I dont know whether to use awk or sed..
If I have a file with alot of names and phone numbers like this
McGowan,Sean 978-934-4000
Kilcoyne,Kathleen 603-555-1212
Club603,The 617-505-1332
Boyle,William 301-444-1221
And... (11 Replies)
The file is repeating blocks of text separated by a blank line. Some of the lines are unique.
e.g.:
This is unique line
This is line 2
This is line 3
This is line 4
This is unique line
This is line 2
This is line 3
This is line 4
...
The goal is to change/replace line 4... (2 Replies)
Hello Friends
I want to use sed command to pick a part of line. FOr example I only need the
/home_put1/bidds/myfo
part of following line
fish://ulavet@rits1.ula.com.tr/home_put1/bidds/myfo
How can I do this bu using sed command ? (2 Replies)
Hi,
I have a input files as below.
Sample of one input file
type mtg_key =
record
decimal("\344") id;
string("\344") ct_cd;
string("\344") st_cd;
end;
type psl_key =
record
decimal("\344") id;
utf8 string("\344") st_cd;
end;
type amk_fields =
record
... (6 Replies)
Hello.
Using a bash script , I have a variable name for the file I want to modify
FILE_TO_EDIT="/etc/my_config_file"And I have a variable name for the parameter to change
PARAMETER="fallback_node"
PARAMETER_NEW_VALUE="http://my_server_name.com/new_path"
A config file may contain :
1°)... (2 Replies)
Discussion started by: jcdole
2 Replies
LEARN ABOUT DEBIAN
apf
APF(1) General Commands Manual APF(1)NAME
apf - easy iptables based firewall system
SYNOPSIS
apf
DESCRIPTION
This manual page documents briefly the apf command. This manual page was written for the Debian distribution because the original program
does not have a manual page.
Advanced Policy Firewall (APF) is an iptables (netfilter) based firewall system designed around the essential needs of today's Internet
deployed servers and the unique needs of custom deployed Linux installations. The configuration of APF is designed to be very informative
and present the user with an easy to follow process, from top to bottom of the configuration file. The management of APF on a day-to-day
basis is conducted from the command line with the 'apf' command, which includes detailed usage information and all the features one would
expect from a current and forward thinking firewall solution.
OPTIONS
apf follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.
-s|--start
load all firewall rules
-r|--restart
stop (flush) & reload firewall rules
-l|--list
list all firewall rules
-t|--status
output firewall status log
-e|--refresh
refresh & resolve dns names in trust rules
-a <HOST CMT|--allow <HOST COMMENT>
add host (IP/FQDN) to allow_hosts.rules and immediately load new rule into firewall
-d <HOST CMT|--deny <HOST COMMENT>
add host (IP/FQDN) to deny_hosts.rules and immediately load new rule into firewall
-u <HOST>|--remove <HOST>
remove host from [glob]*_hosts.rules and immediately remove rule from firewall
-o|--ovars
output all configuration options
COPYRIGHT
Copyright (C) 1999-2007, R-fx Networks <proj@r-fx.org>
Copyright (C) 2007, Ryan MacDonald <ryan@r-fx.org> This program may be freely redistributed under the terms of the GNU GPL
This manual page was written by Giuseppe Iuculano <giuseppe@iuculano.it>, for the Debian project (but may be used by others).
August 17, 2008 APF(1)