Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #89853

Re: Need help with shell script.

From vallor <vallor@vallor.earth>
Newsgroups comp.os.linux.misc
Subject Re: Need help with shell script.
Date 2026-08-10 11:38 +0000
Organization The Unnamed Newswriter
Message-ID <115cd7p$32kkn$4@dont-email.me> (permalink)
References <115b2mq$2natp$1@dont-email.me> <eli$2608092059@qaz.wtf> <2e-dnb0tLsiBz-T3nZ2dnZfqnPednZ2d@giganews.com> <115bm5q$2s4o9$2@dont-email.me> <115cbn8$323nr$2@dont-email.me>

Show all headers | View raw


At Mon, 10 Aug 2026 12:12:40 +0100, The Natural Philosopher
<tnp@invalid.invalid> wrote:

> On 10/08/2026 06:04, pH wrote:
> > On 2026-08-10, c186282 <c186282@nnada.net> wrote:
> >> On 8/9/26 21:01, Eli the Bearded wrote:
> >>> In comp.os.linux.misc, pH  <wNOSPAMp@gmail.org> 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."

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Need help with shell script. pH <wNOSPAMp@gmail.org> - 2026-08-09 23:32 +0000
  Re: Need help with shell script. Eli the Bearded <*@eli.users.panix.com> - 2026-08-10 01:01 +0000
    Re: Need help with shell script. c186282 <c186282@nnada.net> - 2026-08-10 00:23 -0400
      Re: Need help with shell script. pH <wNOSPAMp@gmail.org> - 2026-08-10 05:04 +0000
        Re: Need help with shell script. rbowman <bowman@montana.com> - 2026-08-10 05:44 +0000
          Re: Need help with shell script. pH <wNOSPAMp@gmail.org> - 2026-08-10 19:22 +0000
        Re: Need help with shell script. The Natural Philosopher <tnp@invalid.invalid> - 2026-08-10 12:12 +0100
          Re: Need help with shell script. vallor <vallor@vallor.earth> - 2026-08-10 11:38 +0000
          Re: Need help with shell script. "Stanislav N. aka pztrn" <pztrn@oldproto.invalid> - 2026-08-10 16:40 +0500
            Re: Need help with shell script. pH <wNOSPAMp@gmail.org> - 2026-08-10 19:27 +0000
            Re: Need help with shell script. Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-10 23:58 +0000
              Re: Need help with shell script. Farley Flud <ff@gnulinux.rocks> - 2026-08-11 00:19 +0000
      Re: Need help with shell script. "Stanislav N. aka pztrn" <pztrn@oldproto.invalid> - 2026-08-10 16:31 +0500
        Re: Need help with shell script. c186282 <c186282@nnada.net> - 2026-08-10 21:14 -0400
    Re: Need help with shell script. pH <wNOSPAMp@gmail.org> - 2026-08-10 04:59 +0000
      Re: Need help with shell script. rbowman <bowman@montana.com> - 2026-08-10 05:41 +0000
      Re: Need help with shell script. pH <wNOSPAMp@gmail.org> - 2026-08-10 19:17 +0000
        Re: Need help with shell script. gazelle@shell.xmission.com (Kenny McCormack) - 2026-08-10 20:08 +0000
  Re: Need help with shell script. Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-10 01:36 +0000

csiph-web