Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Morgan Blackthorne
If I was issued a Windows laptop at this point, instead of the Mac that I have now, I'd be able to install bash/etc and have Sublime write files into my Linux filesystem where I can use git and chefdk (I'm guessing, haven't actually tried that yet, though it's on the list when I have spare time), i

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread David Lang
On Fri, 13 May 2016, Yves Dorfsman wrote: On 2016-05-12 17:08, Morgan Blackthorne wrote: Maybe. Right now bash under Windows can only do stuff inside Linux (outside of the filesystems which are mounted). You still can't launch Windows commands/applications from bash, which is pretty limiting. M

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Steve VanDevender
Yves Dorfsman writes: > Once you've used any other prog language, bash seems to be inside out > (variable global by default, ignoring all errors by default, etc...) Let's just remember that 1. bash is primarily meant to be an interactive shell, and the programming features are primarily or

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Steve VanDevender
Mark McCullough writes: > ksh has supported non-global vars for some time using typeset inside a > function declaration (using a different function declaration syntax than used > by old sh to avoid confusion). Support for much more complex structures has > been there for quite some years now,

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Matthew Butch
Its always been bash for me. Sure its annoying sometimes, but its pretty portable between Linux distros and even Unixes (like OS X). Though there are times when I want something more powerful, so I think I need to start learning Python for those situations. > On May 12, 2016, at 18:38, Yves

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Mark Lamourine
Re local variables: I avoided locals as a bashism (not POSIX are they?) for the longest time but I've given in. I also use bash getopts for any scripts which take arguments and will be re-used by other people. Bash getopts is so much better than /bin/getopt that I just can't ignore it. I also h

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Yves Dorfsman
On 2016-05-13 06:30, Mark Lamourine wrote: > I use Bash, but I have come to do something I don't see elsewhere much. > > I make a lot of use of functions and local variables. Basically any time I > see a coherent string of commands whether it's a pipe or a set of logical > checks, I name the oper

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Yves Dorfsman
On 2016-05-12 17:08, Morgan Blackthorne wrote: > Maybe. Right now bash under Windows can only do stuff inside Linux (outside of > the filesystems which are mounted). You still can't launch Windows > commands/applications from bash, which is pretty limiting. Most anything folks > do currently in Pow

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Skylar Thompson
To keep our shell scripts relatively consistent and avoid code reinvention, I've written a suite of shell functions that ends up in a sourceable file in /usr/local/etc. It contains functions for cleaning up temporary files and directories, set PATH appropriately based on OS, output the date in ISO8

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread John Stoffel
This is one of those wonderful conversations to have at times. I starting using Unix with Encore Multimax UMAX language, and for whatever reason, fell into using csh as my shell, then tcsh because I could edit the command lines. As my career progressed, I used alot of perl since being a SysAdmin

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Page, Jeremy
Bash when it's quick, Ruby (Node.js or Python) if I have to use 3rd party libs/parse or build JSON payloads. On Thu, May 12, 2016 at 9:21 PM, Dave Close mailto:d...@compata.com>> wrote: I am astounded by the number of non-bash scripts I've read that are nothing more than feel-good wrappers aroun

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Morgan Blackthorne
Maybe. Right now bash under Windows can only do stuff inside Linux (outside of the filesystems which are mounted). You still can't launch Windows commands/applications from bash, which is pretty limiting. Most anything folks do currently in PowerShell wouldn't be achievable in bash until that barri

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Morgan Blackthorne
I usually tend to agree, though sh vs bash does occasionally make a difference. But yeah, around that time I'm usually looking to refactor it entirely. On Thu, May 12, 2016 at 4:29 PM, David Lang wrote: > On Thu, 12 May 2016, Jack Coats wrote: > > Several friends hated bash (Bourne Again Shell)

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Morgan Blackthorne
So given that I work a lot with Chef a lot of my scripts tend to be ruby, so there's less context-switching involved in languages. That said I still write the occasional bash script because it's just quick and easy for simple tasks, especially where I don't need to do complex parsing or looping. O

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Skylar Thompson
I'm amazed by this as well. A particular pet peeve of mine is a (for instance) Perl script that looks like this: $out = `cmd | grep foo | awk '{print $1}'| sed -e 's!baz!bar!g'` Not only is this something that can be done entirely in Perl, but it's something that can be done entirely in awk as we

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Mark Lamourine
I use Bash, but I have come to do something I don't see elsewhere much. I make a lot of use of functions and local variables. Basically any time I see a coherent string of commands whether it's a pipe or a set of logical checks, I name the operation and put it in a function. String values are 'r

Re: [lopsa-tech] scripting: What do you use if not bash?

2016-05-13 Thread Mark McCullough
> On 2016-05-12, at 15:38 , Yves Dorfsman wrote: > > > A lot of people love to hate bash, and there are good reasons for it, but it > seems that there isn’t an obvious replacement for it. ksh93 is the obvious replacement. I always felt that ksh was intended to be a scripting language, bash w