Re: Need help with shell script.

pH <[email protected]>
Newsgroups comp.os.linux.misc
Organization A noiseless patient Spider
Message-ID <[email protected]>
On 2026-08-10, c186282 <[email protected]> wrote:
> On 8/9/26 21:01, Eli the Bearded wrote:
>> In comp.os.linux.misc, pH  <[email protected]> wrote:
>>> so I thought I'd make a clickable icon on the Desktop to make it easy for
>>> her.
>>> the file "move_pictures" contains:
>>> !/bin/bash,
>>> mv ~/Desktop/*JPG ~/Desktop/Beckys_stuff/
>>> mv ~/Desktop/*PDF ~/Desktop/Beckys_stuff/
>> 
>> If that's your script, one issue looks like the first line:
>> 
>> 	#!/bin/bash
>> 
>> Start with a # and no comma.
>> 
>>> But when I click on it I get an error messaage that pops up in a small
>>> window that says: "There was an error launching the application"
>> 
>> There may be more things wrong that are specific to how you created the
>> launcher, but I don't know anything about Mint launchers.
>> 
>> Elijah
>> ------
>> would probably make the script work with lowercase suffixes, too
>
>    As "Beckys stuff" may be a TWO-word dir, it's important
>    to PUT that all in QUOTES or 'mv' will get confused.
>    The example shows an underscore, but is that there in
>    the actual script ?

Beckys_stuff does indeed have an underscore and it is that way in the actual 
script.

>
>    Also, has it been marked as 'executable' and WHO
>    owns it ??? Finally, command line, the evocation
>    usually requires a dot in front of everything.
Well, since I created it I just assumed I owned it.  
I have done a "chown MYUSER move_pictures

and we'll see what happens.

Can you elaborate on where I need the dot...in the launcher command field?
I'll give it a try...


>
>    The "#!/bin/bash" is kind of optional these days
>    because almost everyone has Bash as their main
>    thing anyway. SOME do install and use other shells,
>    but only SOME. I think I have c-shell installed
>    alongside Bash.
>
>    Anyway, try the exact command in terminal and if
>    that works then it OUGHT to run as a script.
>
It works fine when I type it manually in a terminal which is why I thought
it'd be a piece of cake as a script.

pH
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.