8
rotho98
6y

Today I sat down and made my first two proper scripts in bash, I have been studying and pulling bits of information together, and ive finally got a grasp on Redirection. I found a script for a Dialog driven Menu, tore it to pieces and learnt from it.

2 Hours Later, stupid mistakes and lots of coffee, I have the start of something I think is cool :) If anyone would like to take a look and give me some comments I have pushed both projects to github. And will be working on the GUI one all day :)
https://github.com/Rotho98/...

Comments
  • 1
    Welcome!

    Seems like you had fun! I'll check it out when I can :)
  • 2
    @Jilano Thank you :D
  • 2
    Nice start! Tip: You should redirect errors using >&2. That sends the stream to stderr.
  • 2
  • 0
    @ChachiKlaus thank you, I will correct that now
  • 0
    @ChachiKlaus don't know if I miss understood but changing the 2> to >&2 broke it, made the folders instantly just make a _ folder instead of a first_last folder
  • 1
    Sorry, should have been more specific no it looks good in that file. It's the other one. I was just assuming you were going to put in some condition for if their was a faulty input. That's why. Don't worry about it.
  • 1
    Didn't mean to add confusion.
  • 0
    I have a (command && success box) || fail box setup if that's what you mean
  • 1
    No, where it says echo "bad option" you could redirect that. Because it's a bad input right?
  • 1
    I get what you mean, I could have an error box popup with any errors inside :)
  • 2
    It's not at a big deal at all, your scripts look really good. Just wanted to add that, it's a useful feature.
  • 1
    I'm tempted to tear it apart a little, change it from targets (proof of concept) to clients. Make it so it generates a client folder ready for web projects or something
Add Comment