Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example command does not work as described #1

Open
elyscape opened this issue Oct 27, 2015 · 0 comments
Open

The example command does not work as described #1

elyscape opened this issue Oct 27, 2015 · 0 comments

Comments

@elyscape
Copy link

From the bpkg page:

$ # The following will create a file `/var/log/dump`
$ # on `somehost.com` under `user` with the content `beep`
$ recho user@somehost.com beep > /var/log/dump

Unfortunately, it doesn't work.

Scapeless:recho elyscape$ ls
Scapeless:recho elyscape$ recho elyscape.com test > hi
Scapeless:recho elyscape$ ls hi
hi
Scapeless:recho elyscape$ ssh elyscape.com ls hi
ls: cannot access hi: No such file or directory
Scapeless:recho elyscape$ 

This is because output redirection is handled by the shell. To fix this, you need to escape the redirector, like so:

Scapeless:recho elyscape$ ls
Scapeless:recho elyscape$ recho elyscape.com test \> hi
Scapeless:recho elyscape$ ls hi
ls: cannot access hi: No such file or directory
Scapeless:recho elyscape$ ssh elyscape.com ls hi
hi
Scapeless:recho elyscape$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant