On Wed, Jul 6, 2011 at 5:55 PM, Kristleifur Daðason
<kristlei...@gmail.com> wrote:
>
> On Wed, Jul 6, 2011 at 9:37 PM, SanskritFritz <sanskritfr...@gmail.com>
> wrote:
>>
>>> Hi guys and gals,
>>> i wonder if there is any chance to implement wildcards (*) into
>>> the functionality of fish when using scp?
>>> this works in bash:
>>> $ scp usern...@host.com:~/Whatever/*.pdf .
>>> This command will transfer all files in ~/Whatever/ ending with .pdf to
>>> the working directory.
>>> If i run the same command in fish i get the following:
>>>  ~> scp un...@host.com:~/Whatever/*.pdf .
>>> fish: Warning: No match for wildcard “un...@host.com:~/Whatever/*.pdf”.
>>> The command will not be executed.
>>> scp un...@host.com:~/Whatever/*.pdf .
>>>     ^
>>> I asked around in #fish and SanskritFritz and adisbladis explained to me
>>> it's because bash is checking my files on the remote site or something. (i
>>> didn't quit understand)
>>> My question is:
>>> Would this be possible to implement in fish?
>>> Br
>>> Sebastian Thör
[....]
> What you want is to escape the wildcard, e.g. tell Fish to not process it
> but rather pass it on to the process your're starting. This works here
> because scp accepts wildcards.
> I don't remember the syntax, but it's roughly like this:
> scp user@server:dir/file\* localdir
> or
> scp user@server:"dir/file\*" localdir
> or
> scp "user@server:dir/file\*" localdir
[...]

You can either escape the wildcard or quote it:

scp user@server:dir/file\* locadlir
or
scp user@server:dir/"file*" localdir
or
scp user@server:dir/file"*" localdir
or
scp "user@server:dir/file*" localdir

Cheers,
Philip

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to