02-20-2008
Thanks for your interest!
To soliloquize further I think the answer is that it can't work - according to the man pages:
-exec utility [argument ...] ;
[..] If the string ``{}'' appears anywhere in the utility name or the arguments it is replaced by the pathname of the current file.
[..] Utility and arguments are not subject to the further expansion of shell patterns and constructs.
Please correct me if I am wrong,
thanks anyway,
blued.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am in the process of writing a script to change the grub password in the grub.conf file. I thought I had it figured out, but am running into an a problem I can't put my finger on.
Command I am running when I find that the grub.conf file contains "password --md5".
sed... (1 Reply)
Discussion started by: viRaven
1 Replies
2. Shell Programming and Scripting
Hi,
I want to write the shell script to change multple file name (the file name is get from DB)
e.g. cp db1.txt file1_new.txt
cp db2.txt file2_new.txt
cp db3.txt file3_new.txt
I have write the script like this:
VAR=`sqlplus -s $LOGON @<<ENDOFTEXT
set termout off
... (0 Replies)
Discussion started by: jackyntk
0 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
Is there a way to make exec do a couple of operations on a single input from find?
For example,
find . -type d -exec ls -l "{}" ";"
I would like to give the result of each "ls -l" in the above to a wc. Is that possible?
I want to ls -l | wc -l inside... (1 Reply)
Discussion started by: prasanna1157
1 Replies
4. Shell Programming and Scripting
I hv a file --am executing a script which is giving me unexpected results
COntents of file:
f1
CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:
CMT_AP1:/opt/sybase/syboc125:150:ASE12_5::Y:UX
f1.tmp
CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:... (2 Replies)
Discussion started by: rajashekar.y
2 Replies
5. Ubuntu
Hello,
I am a linux newbe. I want to install a program. I can download it only with wget command from internet.
As far as i know this wget command does not transfer the exacutable flags.
Because of that i wanted to find all configure files and change their mod to 744.
I found this... (1 Reply)
Discussion started by: disconnectus
1 Replies
6. Shell Programming and Scripting
Hi Friends,
Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Discussion started by: ramkumarselvam
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
And when you think you know the basics of something, UNIX in this case, something like what I will describe below comes along....
On a Linux system, a "typical" directory with some files. Say 20.
I do:
> ls | sort > mylisting
Now when I:
> vi mylisting
There is mylisting... (13 Replies)
Discussion started by: stavros
13 Replies
8. Shell Programming and Scripting
Guys,
I want to find the log files greather than 23 days and i want to perform 2 things here.
one is to list the files and second is to gzip the files. hope this can be done using sh -c option. but not sure the exact command.
find . -name "*.log" -mtime +23 -exec ls -la {} \;
... (5 Replies)
Discussion started by: AraR87
5 Replies
9. UNIX for Beginners Questions & Answers
Hello,
Giving those commands:
cat > myfile
1
2
3
^D
cat myfile | awk '{ s=s+$1 ; print s}'
The output is:
1
3
6
It seems like this command iterates each time on a different row so $1 is the first field of each row.. But what caused it to refer to each row ?.
What I mean... (3 Replies)
Discussion started by: uniran
3 Replies
10. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
aa-exec
AA-EXEC(8) AppArmor AA-EXEC(8)
NAME
aa-exec - confine a program with the specified AppArmor profile
SYNOPSIS
aa-exec [options] [--] [<command> ...]
DESCRIPTION
aa-exec is used to launch a program confined by the specified profile and or namespace. If both a profile and namespace are specified
command will be confined by profile in the new policy namespace. If only a namespace is specified, the profile name of the current
confinement will be used. If neither a profile or namespace is specified command will be run using standard profile attachment (ie. as if
run without the aa-exec command).
If the arguments are to be pasted to the <command> being invoked by aa-exec then -- should be used to separate aa-exec arguments from the
command.
aa-exec -p profile1 -- ls -l
OPTIONS aa-exec accepts the following arguments:
-p PROFILE, --profile=PROFILE
confine <command> with PROFILE. If the PROFILE is not specified use the current profile name (likely unconfined).
-n NAMESPACE, --namespace=NAMESPACE
use profiles in NAMESPACE. This will result in confinement transitioning to using the new profile namespace.
-f FILE, --file=FILE
a file or directory containing profiles to load before confining the program.
-i, --immediate
transition to PROFILE before doing executing <command>. This subjects the running of <command> to the exec transition rules of the
current profile.
-v, --verbose
show commands being performed
-d, --debug
show commands and error codes
-- Signal the end of options and disables further option processing. Any arguments after the -- are treated as arguments of the command.
This is useful when passing arguments to the <command> being invoked by aa-exec.
BUGS
If you find any bugs, please report them at <http://https://bugs.launchpad.net/apparmor/+filebug>.
SEE ALSO
aa-stack(8), aa-namespace(8), apparmor(7), apparmor.d(5), aa_change_profile(3), aa_change_onexec(3) and <http://wiki.apparmor.net>.
AppArmor 2.7.103 2012-06-28 AA-EXEC(8)