Sponsored Content
Full Discussion: Why doesn't this work?
Top Forums UNIX for Dummies Questions & Answers Why doesn't this work? Post 302755197 by bakunin on Saturday 12th of January 2013 06:20:45 AM
Old 01-12-2013
Quote:
Originally Posted by scribling
find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \;
On top of what Corona688 already told you: inside an "-exec"-clause only ONE "{}" is allowed. Try this to see the effect:

Code:
find . -type d -exec echo "{}" \;       # will work
find . -type d -exec echo "{} {}" \;    # will not work

If you want to achieve this you will have to write a script which cyou call from the exec-clause:

Code:
find . -type d -exec myscript {} \;

where myscript looks like:

Code:
#! /bin/ksh

print - "$1" "$1"

exit 0

I hope this helps.

bakunin
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

3. Shell Programming and Scripting

ls -d doesn't work on Solaris

Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d Anyone have the same problem and find a resolve? Thanks BobK (9 Replies)
Discussion started by: bobk544
9 Replies

4. UNIX for Dummies Questions & Answers

lp -o <option> doesn't work

why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies

5. Shell Programming and Scripting

awk -v -- Why doesn't my example work?

Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing: foreach num ( 6 5 4 ) awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}' end I would expect the following output: ... (3 Replies)
Discussion started by: treesloth
3 Replies

6. Shell Programming and Scripting

alias doesn't work

Hi I have put alias ll='ls -la' in .profile file but it doesn't work. On hand it works it looks like the .profile file is not beeing read. How to check whitch file is loaded? ,profile? .bash_profile? My system: SunOS mion 5.10 Generic Shell: /bin/pfksh Thanks (2 Replies)
Discussion started by: miojamo
2 Replies

7. Shell Programming and Scripting

if condition doesn't work

i want to get the value for column 4rth when i =4. please guide what i am doing wrong. thanks var=`cat file.csv` for i in $var; do { if ; then var4=$var4+$i fi echo $i } done I am geting this error message "0403-009 The specified number is not valid for this command." (8 Replies)
Discussion started by: sagii
8 Replies

8. HP-UX

Sudo doesn't work

I edited sudoers like this:vi /etc/sudoers subex ALL =(root) NOPASSWD: /usr/ccs/bin/pstack But the respective user still is prompted for password, and even when the right password is used, the command is still not launched.$sudo usr/ccs/bin/pstack 26557 We trust you have received the usual... (5 Replies)
Discussion started by: black_fender
5 Replies

9. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
AECHO(1)							   Netatalk 2.2 							  AECHO(1)

NAME
aecho - send AppleTalk Echo Protocol packets to network hosts SYNOPSIS
aecho [ -c count ] ( address | nbpname ) DESCRIPTION
aecho repeatedly sends an Apple Echo Protocol (AEP) packet to the host specified by the given AppleTalk address or nbpname and reports whether a reply was received. Requests are sent at the rate of one per second. address is parsed by atalk_aton(3). nbpname is parsed by nbp_name(3). The nbp type defaults to `Workstation'. When aecho is terminated, it reports the number of packets sent, the number of responses received, and the percentage of packets lost. If any responses were received, the minimum, average, and maximum round trip times are reported. EXAMPLE
Check to see if a particular host is up and responding to AEP packets: example% aecho bloodsport 11 bytes from 8195.13: aep_seq=0. time=10. ms 11 bytes from 8195.13: aep_seq=1. time=10. ms 11 bytes from 8195.13: aep_seq=2. time=10. ms 11 bytes from 8195.13: aep_seq=3. time=10. ms 11 bytes from 8195.13: aep_seq=4. time=10. ms 11 bytes from 8195.13: aep_seq=5. time=9. ms ^C ----8195.13 AEP Statistics---- 6 packets sent, 6 packets received, 0% packet loss round-trip (ms) min/avg/max = 9/9/10 OPTIONS
-c count Stop after count packets. SEE ALSO
ping(1), atalk_aton(3), nbp_name(3), aep(4), atalkd(8). Netatalk 2.2 17 Dec 1991 AECHO(1)
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy