I have the following Z shell function:
pub () {
scp -q $@ albatross:public_html/scratch
ssh albatross "cd public_html/scratch && chmod 0644 $@"
}
When I run it on multiple files, however, something weird happens:
cirrus:/tmp> touch a b
cirrus:/tmp> set -x
cirrus:/tmp> pub a b
+ pub a b
+ scp -q a b albatross:public_html/scratch
+ ssh albatross 'cd public_html/scratch && chmod 0644 a' 'cd public_html/scratch && chmod 0644 b'
[...]
Why is this happening? Shouldn't it be
+ ssh albatross 'cd public_html/scratch && chmod 0644 a b'
???
I am not using {} after all, am I?
Confuzzled,
--
Please do not send copies of list mail to me; I read the list!
.''`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, admin, user, and author
`. `'`
`- Debian - when you have better things to do than fixing a system
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
Attachment:
signature.asc
Description: Digital signature