10

I'm a Linux user that can do lots of things in Linux, but can't write shell script 😭

Comments
  • 13
  • 8
    It's very easy, you already know the linux commands, all you need is the syntax.
  • 4
    I know how to write shell scripts. But never used them except for once when i had my OS exam.
    I just don't know what to automate....
  • 1
    @mohammed i think i need sometime to learn it
  • 2
    @itch96 i just dont know what to automate too 😂
  • 0
    @vannrith there's nothing to learn as far as shell scripts are concerned
  • 1
    @itch96 @vannrith Start with your bash profile. Check other people's dotfiles on github for things you like. Then create autocomplete functions for all your tools.
  • 0
    How about you manually program your $PS1 variable with bash modules, then add a thumbs up icon if your most recent command returned successful, or a thumbs down (or a poop emoji haha) if it returned unsuccessful. That was a scripting assignment I had which was kinda fun.

    Or maybe program your own calculator and make the GUI with Perl and Tk.
  • 3
    @Seag i already have this functionality as i am using ohmyzsh.
  • 1
    @itch96 I use it to create a changelog from git log messages using git diff
    Pretty fun and forces me to write better commit messages :)
  • 1
    Is it true python is used a lot for Linux scripting nowadays? Is it not inconvenient it needs to always run through python interpreter?
  • 1
    @vertti yes i heard that too...
  • 1
    @vertti I used some Python scripts rather than bash 2 or 3 times, it works fine
  • 4
    Go learn it!
  • 0
    My rule of thumb is use bash and if I can't do it in bash then use python
Add Comment