Re: Need help with shell script.

vallor <[email protected]>
Newsgroups comp.os.linux.misc
Organization The Unnamed Newswriter
Message-ID <[email protected]>
At Mon, 10 Aug 2026 12:12:40 +0100, The Natural Philosopher
<[email protected]> wrote:

> On 10/08/2026 06:04, pH wrote:
> > 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.
> >
> Does it work when you yourself call it *as a script* ?
>
> For some reason none of my desktop icons call scripts.. (Mint MATE) I
> suspect because it didn't work for me either...or they needed root
> perms and have C wrappers to do the setuid(0) bit...

Excuse me, but...no.  (I'm not sure why you thought that would
be necessary, but it isn't.)

-- 
-v System76 Thelio Mega v1.1 x86_64 Mem: 258G
   OS: Linux 7.2.0-rc7 D: Mint 22.3 DE: Xfce 4.18 (X11)
   NVIDIA GeForce RTX 3090Ti (24G) (610.57.04)
   "The most expensive component is the one that breaks."
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.