As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Recently started work at a place that uses windows exclusively, and really could do with a simple shell that replicates bash functionality. MinGw and Cygwin seem overkill for what I need. Any suggestions gladly accepted.
Thanks
You don't have to install all of Cygwin, since you can select individual packages.
Having said that, I still prefer to install the lot simply because I would rather have all the tools handy when I need them, rather than having to go and figure out which packages they're in. Even if you install the lot, no-ones forcing you to use all of them and, let's face it, disk space is hideously inexpensive nowadays.
If you want individual binaries for things like grep, sed and awk, you can also look into GnuWin32 - these are native executables that don't require the Cygwin DLL. You can just choose the executables you want from the package list and they'll be installed for you.
A shell's functionality usually uses external programs. You can download the windows versions of the tools you want:
grep, awk, sed
You might also want to take a look into PowerShell - a windows shell that is actually good(much, much, much better than CMD), and has good interaction with the Windows environment.
Not exactly a shell, but I still use tools from the UnxUtils package, one of many tool sets which has ported little lightweight commands/apps/tools, ever so handy and useful in scripts.
Nowadays I am also exploring Powershell more and more, a shell certainly worth taking a look at. On Wikipedia's Powershell page one can even find a comparison of cmdlets with similar commands in Bash a.o., which you might find interesting.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I would like to learn some scripting to help automate some common tasks. Is ruby a good language to learn for this and what gems will be useful?
I would like to make scripts similar to this bash script
http://nikhgupta.com/code/initialize-gitolite-bash-script/
Which automates setting up a new gitolite repo.
Would you just learn bash, sed grep etc?
Sounds like a job for Ruby and Rake! Check this out.
In my opinion, Python and Ruby are the best languages out there, when it comes to automating tasks in *NIX systems. Being a Windows buff, I'd stick to PowerShell..
For Linux/Unix administration good shell scripting skills is essential. For more advanced automation, it is also good to know python, perl, or ruby. It really doesn't matter which you choose. Once you have become proficient with one, you will find that picking up the others to be an easy task.
Personally, ruby's package management system (gems) has always turned be off from using it from a scripting platform. Others hold different opinions and like it.
Pick one and dive in.
Some years ago I would have recommended to use PERL for things like that.
In my opinion it's always a good idea to have some base knowledge of shell scripting but if you really want to do something "bigger" use a script language (like Python, Ruby or Perl).
In meantime I see no reason to not use ruby for things like that. I really enjoy this language and you can do everything (?) that you could do in PERL in ruby as well (and you will have a real OO language at hand).
CPAN on the other hand is a quite nice argument to use PERL. Ruby gems are similar but I don't think there are that many gems as CPAN-modules available. But please compare by yourself (http://rubygems.org/).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am switching to a Mac web development environment (esp. Python and Javascript) after using a PC for many years. On the PC, I used Notepad2 for most of my development; a really great minimal drop-in replacement for notepad. It has a very short install and setup process. I did not want code folding, I did not want a tabbed/multi document interface, and I think this lighter editing philosophy works well with interpreted languages. Notepad2 does syntax highlighting and powerful text operations well, plenty of sexy keyboard shortcuts.
Based on this, what kind of editor would you recommend for Mac? I am looking into TextEdit, Textwrangler, and PyCharm so far. Or should I man up and Vim?
I'd highly recommend TextWrangler. Although I was not his best friend at start I just love him now. Very powerful while (at the same time) straight forward and simple. When looking into Vim give MacVim a try (GVim for Mac). If provides a GUI granting you the possibility to keep basic text editor usage pattern like copy&paste (cmd-c cmd-v ...). Comfortable especially when using other ('regular') text editors in parallel.
I'm frequently using both of them.
I use TextEdit on Mac, but I use Vim when I'm in the terminal on Mac. So I'd say do both. Checkout Playterm.org, they have some great Vim tutorials on there.
Textwrangler is okay, but I've found that the RegEx support/usability in TextEdit is superior. That's just me.
I haven't used PyCharm, so I cannot say. As far as Vim goes, it's a tool, and it does take time to learn how to use. That being said, you can use it cross-platform and have access to all of the extras for it. It's also free, whereas TextMate isn't.
I will put in a vote for Sublime Text 2. Very powerful, fast, and extensible.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
In what ways are scripting languages (especially bash) is used to manage large C++/C programming projects?
It will be helpful if someone can list some clever uses of scripts in their programming projects at automating certain tasks.
I personally used shell scripting to invoke my program multiple times for different inputs, for loading the necessary modules before I try to run my program, for automatic graph plotting with gnuplot etc. When I was working on huge clusters I also found a script very useful when I had to set/query some runtime settings to launch my tasks on the cluster. I always use GNU Make to build my programs, but if you have extremely small non-critical projects, you can use scripts to even build your code.
I am sure that there are a lot of other innovative ways to use bash scripts, but whatever I just said is from the perspective of an ordinary developer who does a lot of (almost) mundane stuff everyday. And bash scripts have made my life a lot easier, to say the least.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Can anyone recommend a free VBScript compiler?
You can do it for free with Vbsedit
VBScript is an interpreted language, not a compiled one. If you want to make a binary executable out of your VBScript code, you will need to port it to Visual Basic or Visual Basic .NET first. As for free compilers, Visual Basic .NET Express edition is available for free.
If you're trying to compile VBScript in order to hide something like a password, you're probably doing it wrong.
This compiler is $49: http://www.xuebrothers.net/sh/sh.htm and has a free demo.
Any compiler for this language promptly turns it back into the plaintext script before running it, so you lose the benefit of obscurity against any determined attacker. If you absolutely won't pay for any of the compilers, your best bet might be to re-write it using one of the free visual studio basic variants, and compile that.
http://www.microsoft.com/express/
Yes... you can definitely use VbsEdit.. download evaluation copy from http://www.vbsedit.com/
OR
save the file as .vbs file and try to execute the same with double clicking the file... debugging is little tough job...
Could use Mono. It's free. Also available for Linux, Mac, as well as PC.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've recently began using dTrace and have noticed just how awesome it is. Its the perfect tool for profiling without placing the burden on programmers to set up hundreds of probes in their applications.
I've found some nice one liner and sample scripts here and there, but I was wondering about what scripts, tools and links others might want to share.
BTW Anybody tried Chimes?
Here are some links I've found useful
A Powerpoint presentation about dTrace:
http://www.nbl.fi/~nbl97/solaris/dtrace/dtt_present.pdf
200+ useful scripts:
http://www.brendangregg.com/
I attended Theo Schlossnagle's Full Stack Introspection Crash Course talk at OSCON this year. In that presentation he gives several examples of using the D-Trace language and at the above link there are some additional utilities.
It's worth noting that because of the differences in Apple's and Sun's implementations, dtrace scripts from Solaris may not (likely won't) work on Leopard, and vice-versa. I'm not sure about FreeBSD's version.
The main problem is a different set of probes made available by the OS. Sometimes the probes will be provided under a different name. Sometimes they'll be more or less specific from one OS to another. Just a gotcha in case you come across a script that, for some reason, won't work.
Unfortunately dTrace is only implemented in/for Solaris OS. People from sun are recommend me to port all my php applications to Solaris, and "dtrace" them. After optimizing to again port them on my previous OS.