Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Unix Shell Programming

Options
  • 12-03-2013 1:33pm
    #1
    Closed Accounts Posts: 1,460 ✭✭✭


    This post has been deleted.


Comments

  • Moderators, Technology & Internet Moderators Posts: 11,011 Mod ✭✭✭✭yoyo




  • Registered Users Posts: 1,109 ✭✭✭Skrynesaver


    Advanced bash scripting guide, it's part of the Linux documentation project and it is the best resource for shell scripting I've come across.

    As with all programming/scripting practice makes the difficulty obvious.

    using
    set -x
    
    at the start of the script will give you an idea of what each line is evalued as by the interpreter.

    the echo command is also your friend if you want to know what's happening in your script

    The Unix forum here and the Homework forum of Unix.com could be useful for advice when you hit a dead end.


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    That's the resource I use, it's very well put together.


  • Moderators, Technology & Internet Moderators Posts: 1,334 Mod ✭✭✭✭croo


    There was no web when I started out so perhaps books are not longer needed but many years ago I bought Learning Korn Shell and thought I got great value from it.

    Likewise I also found Unix Power Tools , another O'Reilly book, to be a very useful source of basic scripts.

    But as I say these days with the web they might be obsolete... but if you can find them in the uni library check 'em out


  • Registered Users Posts: 1,931 ✭✭✭PrzemoF


    OP, are you familiar with command line? Shell programming is based on command line, so if you know nothing about command line maybe you should start there?

    If you're not using linux you should install it now or at least get a livecd.

    Some links that might be useful:
    http://dl.dropbox.com/u/397277/bash_shell_cheat_sheetV2.pdf
    http://tille.garrels.be/training/bash/


  • Advertisement
  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    croo wrote: »

    Likewise I also found Unix Power Tools , another O'Reilly book, to be a very useful source of basic scripts.

    Unix Power Tools is on my shelf and I use it almost daily. Im tempted to buy another copy and keep one in work and one at home.


  • Registered Users Posts: 446 ✭✭Ant


    syklops wrote: »
    Unix Power Tools is on my shelf and I use it almost daily. Im tempted to buy another copy and keep one in work and one at home.

    Coincidentally, I only just started reading it over the past two weeks. I actually bought it a few years ago in Chapters but it got lost among the rest of my books. For some reason, I thought it was solely about sed and awk. Little did I realise that it's a must-read for anyone interested in using command-line Unix to its fullest potential. While dipping into it, I've discovered all sorts of useful features, short-cuts, commands and parameters that I hadn't come across before.


  • Moderators, Society & Culture Moderators Posts: 9,679 Mod ✭✭✭✭Manach


    There good unix books on O'Reilly in PDF/Mobi format including the excellent Power tools.


  • Registered Users Posts: 36 ld50


    Hi Guys,

    so I just started a Unix shell programming module in college, im finding it very difficult to comprehend and would like to ask if anybody knows of any good books, websites, video tutorials etc that would be able to help me out. I would be very grateful

    cheers

    I've found this useful in the past.

    http://mywiki.wooledge.org/BashPitfalls

    Mh


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    Ant wrote: »
    Coincidentally, I only just started reading it over the past two weeks. I actually bought it a few years ago in Chapters but it got lost among the rest of my books. For some reason, I thought it was solely about sed and awk. Little did I realise that it's a must-read for anyone interested in using command-line Unix to its fullest potential. While dipping into it, I've discovered all sorts of useful features, short-cuts, commands and parameters that I hadn't come across before.

    Its basically the Bash bible. Like you it was sat on my shelf for a while too until I picked it up one day, now I use it all the time. I often get answers faster than a google search. And thats saying something.


  • Advertisement
  • Registered Users Posts: 1,109 ✭✭✭Skrynesaver


    syklops wrote: »
    Unix Power Tools is on my shelf and I use it almost daily. Im tempted to buy another copy and keep one in work and one at home.

    No, you get work to buy a copy...

    I have a copy and while I tend to write bash with the occasional simple awk/sed statement in it until I break out Perl when it gets complex (or sometimes just because I find it easier to think in Perl) Unix Power tools is an essential part of every scripters toolkit.


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    No, you get work to buy a copy...

    I'll be a while waiting for that purchase order to get approved.


Advertisement