Skip to content
This repository has been archived by the owner on Apr 20, 2019. It is now read-only.

Run commands in batches #3

Open
jeff-kline opened this issue Nov 12, 2012 · 4 comments
Open

Run commands in batches #3

jeff-kline opened this issue Nov 12, 2012 · 4 comments

Comments

@jeff-kline
Copy link

I would like to see the '-cmd' flags work with the '-f' flag. For example, if one would like to remove 50 files with uberftp, simply create a text file 'foo' containing the URLs and then issue the command:
uberftp -rm -f foo

Thanks, --Jeff

@JasonAlt
Copy link
Owner

This is a good idea. I may need to massage the option name some to make it work. As is, -f would be passed to rm and I'd like to reserve -f for forcing if I ever add prompting. I think it should be more inline with the batch option '-f ' which is what I think you intended. Perhaps '-f -rm' although that is not very intuitive imo.

@jeff-kline
Copy link
Author

Would it be possible to change the behavior of -cmd to read from stdin if no argument is provided? Or possibly you could specify a file format that allows users to include a command in the file.

@JasonAlt
Copy link
Owner

I think if you are going to read from stdin, you might as well do:

echo "rm file | uberftp "

The file format change may be the way to go. If the file doesn't contain an explicit command (like rm ) then it could assume 'put' so it would maintain backwards compatibility.

@fr4nk5ch31n3r
Copy link

Hi all,

a longer time ago I experimented with passing commands via stdin to uberftp. My goal was to gain low-level protocol access to GridFTP command channels - uberftp has this very nice [l]quote command. But to really benefit from this functionality, you also need to be able to evaluate uberftp's output during a running session.

I came up with a small howto. And as I recognized this "issue", I thought you might be interested. I've entered the howto into the gtransfer wiki. But maybe it would fit better in UberFTP's wiki, although I then could remove part of the introduction.

@JasonAlt
Interested?

Bye
Frank

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants