the lemmy.monster
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
zarkanian@sh.itjust.works to Bash@lemmy.mlEnglish · 5 months ago

bash tricks

sh.itjust.works

message-square
37
fedilink
351

bash tricks

sh.itjust.works

zarkanian@sh.itjust.works to Bash@lemmy.mlEnglish · 5 months ago
message-square
37
fedilink
  • waigl@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    5 months ago

    Bottom left example will leave you with a lot pictures ending on “.png.jpg”.

    • zarkanian@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      What’s a better way?

      • Great Blue Heron@lemmy.ca
        link
        fedilink
        English
        arrow-up
        9
        ·
        edit-2
        5 months ago

        convert $i ${i%.*}.jpg

        NB: I’m no guru - I just googled “remove file extension in bash”.

        • qqq@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          5 months ago

          Should also definitely be quoting both arguments

Bash@lemmy.ml

bash@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Talk about the Bash Shell and Bash scripting

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1 user / week
  • 9 users / month
  • 458 users / 6 months
  • 1 local subscriber
  • 892 subscribers
  • 36 Posts
  • 49 Comments
  • Modlog
  • mods:
  • Elsie@lemmy.ml
  • Wronnay@lemmy.ml
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org