[PLUG] Strange mv behavior

2021-02-09 Thread Rich Shepard

I found where OBS studio puts the logs (~/.config/obs-studio/logs/) where
they are listed with a space between the date and the time. When I try to mv
the spacey one to one without spaces I cannot:
$ mv 2021-02-09 06-56-46.txt 2021-02-09-06-56-46.txt
mv: target '2021-02-09-06-56-46.txt' is not a directory

Same thing happens with cp, if I try to move the destination file to ~/, and
if I use the -T option. But, when I display the file in emacs and save it
without spaces it does so.

Has anyone seen this before? I haven't!

Rich
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Strange mv behavior

2021-02-09 Thread Galen Seitz

On 2/9/21 9:25 AM, Rich Shepard wrote:

I found where OBS studio puts the logs (~/.config/obs-studio/logs/) where
they are listed with a space between the date and the time. When I try 
to mv

the spacey one to one without spaces I cannot:
$ mv 2021-02-09 06-56-46.txt 2021-02-09-06-56-46.txt
mv: target '2021-02-09-06-56-46.txt' is not a directory


The shell thinks you want to pass three arguments to mv.  If you have 
spaces in filenames, the filename must be quoted, otherwise the shell 
thinks you are referring to two separate files.


mv '2021-02-09 06-56-46.txt' 2021-02-09-06-56-46.txt

or

mv 2021-02-09\ 06-56-46.txt 2021-02-09-06-56-46.txt


At least I think this is a shell thing.  Regardless, you need to deal 
with the fact that your filename contains spaces.  If you use tab 
filename completion in the shell, it will typically do the quoting for you.


galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Strange mv behavior

2021-02-09 Thread TomasK
This is not strange behavior - space is command line argument separator
in shells.

Escape (precede) the space with backslash \ OR quote the file name with
the space inside "file name" or 'file name'.

-T

On Tue, 2021-02-09 at 09:25 -0800, Rich Shepard wrote:
> I found where OBS studio puts the logs (~/.config/obs-studio/logs/)
> where
> they are listed with a space between the date and the time. When I
> try to mv
> the spacey one to one without spaces I cannot:
> $ mv 2021-02-09 06-56-46.txt 2021-02-09-06-56-46.txt
> mv: target '2021-02-09-06-56-46.txt' is not a directory
> 
> Same thing happens with cp, if I try to move the destination file to
> ~/, and
> if I use the -T option. But, when I display the file in emacs and
> save it
> without spaces it does so.
> 
> Has anyone seen this before? I haven't!
> 
> Rich
> ___
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Strange mv behavior

2021-02-09 Thread Rich Shepard

On Tue, 9 Feb 2021, Galen Seitz wrote:


The shell thinks you want to pass three arguments to mv. If you have
spaces in filenames, the filename must be quoted, otherwise the shell
thinks you are referring to two separate files.


Galen,

Sigh. I know that file names in spaces need to be quoted but I guess my head
was inserted where the sun don't shine this morning.

Thanks for pulling it out.

Rich
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Using curl for file transfer

2021-02-09 Thread Michael Barnes
I use a program that uses curl to automate ftp file transfers. The problem
I have run into is the username for the ftp account is an email address (
u...@host.com). When I enter the information in the window to edit the
downloads, I put in the host information, then in the user box, I put
u...@host.com. Unfortunately, the download failed. It was suggested to
escape the @, so I tried user\@host.com, but the program did not accept the
\. When I typed it, it just didn't show up.

So, any curl experts out there can help me put the @ in the username?

Thanks,
Michael
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Bill Barry
On Tue, Feb 9, 2021 at 2:09 PM Michael Barnes  wrote:
>
> I use a program that uses curl to automate ftp file transfers. The problem
> I have run into is the username for the ftp account is an email address (
> u...@host.com). When I enter the information in the window to edit the
> downloads, I put in the host information, then in the user box, I put
> u...@host.com. Unfortunately, the download failed. It was suggested to
> escape the @, so I tried user\@host.com, but the program did not accept the
> \. When I typed it, it just didn't show up.
>
> So, any curl experts out there can help me put the @ in the username?
>
Not a curl expert, but this
https://stackoverflow.com/questions/32122586/curl-escape-single-quote/39802572
suggests you also have to escape the \ also as in '\'@
ymmv
Bill Barry
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Ken Stephens
Single quotes around the email addess?

On Tue, Feb 9, 2021 at 12:09 PM Michael Barnes 
wrote:

> I use a program that uses curl to automate ftp file transfers. The problem
> I have run into is the username for the ftp account is an email address (
> u...@host.com). When I enter the information in the window to edit the
> downloads, I put in the host information, then in the user box, I put
> u...@host.com. Unfortunately, the download failed. It was suggested to
> escape the @, so I tried user\@host.com, but the program did not accept
> the
> \. When I typed it, it just didn't show up.
>
> So, any curl experts out there can help me put the @ in the username?
>
> Thanks,
> Michael
> ___
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Tomas Kuchta
On Tue, Feb 9, 2021, 15:41 Ken Stephens  wrote:

> Single quotes around the email addess?
>
> .


I think that there may be more to the problem description.

Curl is command line tool OP mentions box/window - that would suggest some
GUI contraption where escaping or quoting will not work as in shell.

Perhaps, we need to see the problematic command line (with changed
username/hostname of course).

-T

>
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Michael Barnes
On Tue, Feb 9, 2021 at 7:28 PM Tomas Kuchta 
wrote:

> On Tue, Feb 9, 2021, 15:41 Ken Stephens 
> wrote:
>
> > Single quotes around the email addess?
> >
> > .
>
>
> I think that there may be more to the problem description.
>
> Curl is command line tool OP mentions box/window - that would suggest some
> GUI contraption where escaping or quoting will not work as in shell.
>
> Perhaps, we need to see the problematic command line (with changed
> username/hostname of course).
>
> -T
>
> >
>

The program is for radio station automation. It has a number of gui modules
for different things. One of these downloads audio files from program
providers for later play on the air. The module uses the cURL Library for
the file transfer portion. When you program each download, you put in the
various information items of host, filename, username, password, download
time, etc. Does that clarification help?

Michael
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Tomas Kuchta
Is the GUI opensource? Could you modify the code to properly handle @ in
the user name?

This does not look like curl problem - in my experience curl command line
accepts @ in --user without issues.

I am sorry, I was hoping that there is curl command line involved somehow.

-T

On Tue, Feb 9, 2021, 22:41 Michael Barnes  wrote:

> On Tue, Feb 9, 2021 at 7:28 PM Tomas Kuchta 
> wrote:
>
> > On Tue, Feb 9, 2021, 15:41 Ken Stephens 
> > wrote:
> >
> > > Single quotes around the email addess?
> > >
> > > .
> >
> >
> > I think that there may be more to the problem description.
> >
> > Curl is command line tool OP mentions box/window - that would suggest
> some
> > GUI contraption where escaping or quoting will not work as in shell.
> >
> > Perhaps, we need to see the problematic command line (with changed
> > username/hostname of course).
> >
> > -T
> >
> > >
> >
>
> The program is for radio station automation. It has a number of gui modules
> for different things. One of these downloads audio files from program
> providers for later play on the air. The module uses the cURL Library for
> the file transfer portion. When you program each download, you put in the
> various information items of host, filename, username, password, download
> time, etc. Does that clarification help?
>
> Michael
> ___
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug