Your problem is that the regex separators / occur in the replacement text as well - char 29 is the "v" from /var/www...
Try different regex separators (e.g. # )
Hi,
Is there any way to traverse the file once and look for the following conditions in one sweep instead of going over the file 3 times with different search criteria......
sed -n '/^ORA-07445/ p' /tmp/t$$ > ${OERRFILE}
sed -n '/^ORA-00600/ p' /tmp/t$$ >> ${OERRFILE}
... (1 Reply)
hello there, I have a sed question.
I have a file (temp.srv), in it it has
v1_host1
v2_host2
And I have another file (temp2.srv), in it is has
v1_host3_date
v1_host1
v2_host2
v2_host4_date
v3_host5_date
I had used a script to remove the name from temp2.srv base on the name inside... (3 Replies)
Hi,
When deleting lines using sed, as i understand the lines are redirected to the standard output. What i'm unclear about is how to actually modify the file?
If I write the command sed '1,2d' test it will display lines one and 2 onto the screen however the file is not modified? I think my... (5 Replies)
I have a file that conatins following info
Policy1=U|guestRoom=test1idCode=5(1):!:Amenity2=U|RoomId=testrma=4(1):!:|
GuestRoomAmenity1=U|guestRoomId=testguest1id^rmaCode=5(1):!:|
I need it to look like this
Policy1=U|guestRoom=test1idCode
Amenity2=U|RoomId=testrmaCode... (2 Replies)
How would I use sed to print everything on the line after the regular expresion?
I have a configuration file setting several variables.
cfg.dat
DDB = cpptest
SUDBNAME = sucpptestdb
host = cpptest
Example
I want to search for the regular expresion 'SUDBNAME =' and print everything on... (3 Replies)
Write a sed script to extract the year, rank, and stock for the most recent 10 years available in the file top10_mktval.csv, and output in the following format:
------------------------------
YEAR |RANK| STOCK
------------------------------
2007 | 1 | Exxon... (1 Reply)
hi
i have a file with this line:
variable=/export/home/oracle
I want to change the file so that the path is replaced with the value of another variable
var2=/tmp/anything.
how to do this in sed?
thx (4 Replies)
I need to replace the numbers with a new string.
How can I give a wildcard for the different # of numbers
sed '/abcdef/s/abcdef=*/abcdef=999999/'<foo>foo1
From: To:
abcdef=1234 abcdef=999999
abcdef=12345 abcdef=999999
abcdef=123456... (10 Replies)
I am trying to write a script that will take an input text file in the format
person: place: phonenumber;
person: place: phonenumber;
person: place: phonenumber;
...
and output it using sed too:
Name ######## Location ######### Phone Number... (1 Reply)
Discussion started by: jmack56
1 Replies
LEARN ABOUT DEBIAN
aa-easyprof
AA-EASYPROF(8) AppArmor AA-EASYPROF(8)NAME
aa-easyprof - AppArmor profile generation made easy.
SYNOPSIS
aa-easyprof [option] <path to binary>
DESCRIPTION
aa-easyprof provides an easy to use interface for AppArmor policy generation. aa-easyprof supports the use of templates and policy groups
to quickly profile an application. Please note that while this tool can help with policy generation, its utility is dependent on the
quality of the templates, policy groups and abstractions used. Also, this tool may create policy which is less restricted than creating
policy by hand or with aa-genprof and aa-logprof.
OPTIONS
aa-easyprof accepts the following arguments:
-t TEMPLATE, --template=TEMPLATE
Specify which template to use. May specify either a system template from /usr/share/apparmor/easyprof/templates or a filename for the
template to use. If not specified, use /usr/share/apparmor/easyprof/templates/default.
-p POLICYGROUPS, --policy-groups=POLICYGROUPS
Specify POLICY as a comma-separated list of policy groups. See --list-templates for supported policy groups. The available policy
groups are in /usr/share/apparmor/easyprof/policy. Policy groups are simply groupings of AppArmor rules or policies. They are similar
to AppArmor abstractions, but usually encompass more policy rules.
-a ABSTRACTIONS, --abstractions=ABSTRACTIONS
Specify ABSTRACTIONS as a comma-separated list of AppArmor abstractions. It is usually recommended you use policy groups instead, but
this is provided as a convenience. AppArmor abstractions are located in /etc/apparmor.d/abstractions. See apparmor.d(5) for details.
-r PATH, --read-path=PATH
Specify a PATH to allow owner reads. May be specified multiple times. If the PATH ends in a '/', then PATH is treated as a directory
and reads are allowed to all files under this directory. Can optionally use '/*' at the end of the PATH to only allow reads to files
directly in PATH.
-w PATH, --write-dir=PATH
Like --read-path but also allow owner writes in additions to reads.
-n NAME, --name=NAME
Specify NAME of policy. If not specified, NAME is set to the name of the binary. The NAME of the policy is often used as part of the
path in the various templates.
--template-var="@{VAR}=VALUE"
Set VAR to VALUE in the resulting policy. This typically only makes sense if the specified template uses this value. May be specified
multiple times.
--list-templates
List available templates.
--show-template=TEMPLATE
Display template specified with --template.
--templates-dir=PATH
Use PATH instead of system templates directory.
--list-policy-groups
List available policy groups.
--show-policy-group
Display policy groups specified with --policy.
--policy-groups-dir=PATH
Use PATH instead of system policy-groups directory.
--author
Specify author of the policy.
--copyright
Specify copyright of the policy.
--comment
Specify comment for the policy.
EXAMPLE
Example usage for a program named 'foo' which is installed in /opt/foo:
$ aa-easyprof --template=user-application --template-var="@{APPNAME}=foo" --policy-groups=opt-application,user-application
/opt/foo/bin/FooApp
BUGS
If you find any additional bugs, please report them to Launchpad at <https://bugs.launchpad.net/apparmor/+filebug>.
SEE ALSO apparmor(7)apparmor.d(5)AppArmor 2.7.103 2012-07-16 AA-EASYPROF(8)