Do U create scripts from scratch?

Muhammed HMuhammed H Member Posts: 93 ■■■□□□□□□□
To all Linux Pros, I know this question may sound bit silly. But I would like to know, whenever you need to build any scripts, do you create those from the scratch or you collect some kind of similar script and then tailor that according to your needs? In my company, there are some really good Linux engineers and what they normally do, they google and find a similar script from the net and then tailor those as they want. Is that a normal practice? Sorry again if U find the question too silly and Thanks in Advance.

Comments

  • brombulecbrombulec Member Posts: 186 ■■■□□□□□□□
    Both.
    If i need specific script I'll write it in bash/python/perl (mixed) but if there is a solution there is no need to invent the wheel again.
    The way that you engineers follows is quite normal - it saves a lot of time.
    And of course there is no possibility to know all the tips and tricks in all scripting languages. You can choose the best language for you - perl, ruby, python - and use it as a primary scripting language.
  • asummersasummers Member Posts: 157
    Muhammed H wrote: »
    To all Linux Pros, I know this question may sound bit silly. But I would like to know, whenever you need to build any scripts, do you create those from the scratch or you collect some kind of similar script and then tailor that according to your needs? In my company, there are some really good Linux engineers and what they normally do, they google and find a similar script from the net and then tailor those as they want. Is that a normal practice? Sorry again if U find the question too silly and Thanks in Advance.

    I normally write them from scratch but then again I am just awesome.
  • jvrlopezjvrlopez Member Posts: 913 ■■■■□□□□□□
    If there is something available at work that is close to what I want to have done, I'll modify it.

    If not, I just start from scratch and go from there.

    Having someone take a script of yours and apply it elsewhere for another problem is quite flattering.
    And so you touch this limit, something happens and you suddenly can go a little bit further. With your mind power, your determination, your instinct, and the experience as well, you can fly very high. ~Ayrton Senna
  • XavorXavor Member Posts: 161
    It depends on what you need to do.

    If I'm manipulating text to a specific format I will grep | awk | cat | sed | whatever to get the result. If I have to repeat it a lot, I'll put that in a script and clean it up.
  • asummersasummers Member Posts: 157
    On a serious note though - I have never reused a script from the internet as a whole. I might look for snippets of "how to do this" but never the whole script.

    For 3 reasons:

    1. The code online is unlikely to meet requirements 100%
    2. The code online often has additional stuff that I don't want
    3. I wouldn't feel happy to give that to my clients as pass it off as my work
  • Kinet1cKinet1c Member Posts: 604 ■■■■□□□□□□
    asummers wrote: »
    On a serious note though - I have never reused a script from the internet as a whole. I might look for snippets of "how to do this" but never the whole script.

    For 3 reasons:

    1. The code online is unlikely to meet requirements 100%
    2. The code online often has additional stuff that I don't want
    3. I wouldn't feel happy to give that to my clients as pass it off as my work

    This is what I do too. Soon I'll be at a level where I can create my own, hopefully.
    2018 Goals - Learn all the Hashicorp products

    Luck is what happens when preparation meets opportunity
  • /pub/beer//pub/beer/ Member Posts: 67 ■■■□□□□□□□
    I create my own, but regularly reference scripts I've created for logic blocks when I make a new script. If I need a certain if/then setup - or loop, I'll grab from my past collection.

    I will grab certain awk/grep/regex bits online, but I believe starting from scratch helps build the underlaying knowledge. You get to the point where you rely on a google search less and less.
    Certification Goal:
    - ¯\_(ツ)_/¯
Sign In or Register to comment.