better command for Windows? [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
While I grew up using MSWindows, I transitioned to my much-loved Mac years ago. I don't want to start a flame war here on operating systems. I do, however, want a terminal a litle closer to what I'm used to.
I'm not asking for full POSIX support - I don't have the patience to install Cygwin - but I miss tabbed terminals, being able to easily cut and paste, and my good friends ls, mkdir, rm, et al. (For these last ones, I could always put .bat files on my path, but that's going to get old fast.)
Anybody have a terminal application for MSWindows XP ?

I'm using powershell, its awesome to keep you from going crazy, and it has rm and mkdir and ls.
Tabbed terminals is still not in powershell, and copy paste is similar to cmd, but its way better than cmd.exe.

Some more options:
MSYS: a Minimal SYStem providing a POSIX compatible Bourne shell environment, with a small collection of UNIX command line tools. Primarily developed as a means to execute the configure scripts and Makefiles used to build Open Source software, but also useful as a general purpose command line interface to replace Windows cmd.exe.
GNU utilities for Win32: ports of common GNU utilities to native Win32. In this context, native means the executables do only depend on the Microsoft C-runtime (msvcrt.dll) and not an emulation layer like that provided by Cygwin tools.

PowerCmd is great, with a ton of features including tabs, cut/copy/past, etc.
Console is also a great replacement and is a bit more stripped down than PowerCmd (which can sometimes be a little too feature rich.
Also, with both of these, if you have powershell installed, it is possible to run powershell from withing either.

If you are a bit of a Pythonista then iPython is tough to beat. It has some of the more common shell commands coded in (i.e. ls, pwd, cd etc.), can also run any other shell command by prefixing with '!' (i.e. !latex file.tex) but also is a full Python shell with history, tab-complete, multiline editor support, logging etc. etc.
Moreover, you can install iPython back on your UNIX boxes as well as Windows meaning your environment can follow wherever you go.

There is a new-ish open source Console Emulator called cmder. It looks really nice and has some advanced features that make it nicer to use. You can also use powershell with it. Best of all, it's portable!

I've never found anything I like more than Cygwin.
I also went ahead and installed Cygwin/X w/ Openbox so I can get something like this:
It's got multiple workspaces inside the main Openbox window so I can easily have up to 20 non-overlapping xterms that I can easily cycle through.

I know you said you don't want to install anything, but I strongly suggest you give Services For Unix a shot:
http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx

I use Console with unxutils
Console for the tabs and easier to manage select/copy/paste
unxutils for ls, rm, grep, uniq, sort ... and other goodness.

PowerShell is amazing, however for anything other than the most basic commands there is a learning curve when switching from bash etc.
I went back to using cygwin.

PowerShell is worth looking into.

Related

why does windows have so many shells and command line interfaces? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have recently switched from MacOSX to Windows, and having had much experience using the OSX Terminal, I've been surprised by how many different CLI's there are in Windows. Specifically, it seems that in addition to cmd.exe and powershell, when I have installed some programs that require CLI usage, they create their own CLI's, i.e. git cmd, git bash, etc.
I'm used to working within one single app (terminal) for all of my projects/tasks, and switching between different CLI's for various tasks is proving annoying and confusing.
I'm not sure I'm asking the right question, so please let me know if you need a different one...: For those of you who have experience working at the command line in windows, is it 'normal' to keep switching between CLI's for different needs, or is it reasonable to get to a point with one CLI (i.e. powershell)? And if so, what should I be looking into?
Thanks in advance!
Standard Cmd/Windows Command windows is basically your backwards compatible shell for Windows that will run everything specifically developed for it, including DOS batch files, etc.
Powershell is a supercharged, newer command window that allows scripting that is compatible with modern system administration for server environments in organizations, similar to vbscript or javascript. Admins can run more compatible/modern scripting than the old DOS Batch files. It's really a new/separate scripting language, while still supporting most basic Windows Cmd window commands.
Git installs Git-cmd, which basically acts like a normal windows command terminal, and Git-Bash launches a unix-style Bash shell, because Git originated on Linux (and for Linux development..) and it's core operations expect a lot of core Linux commands, libraries and/or utilities. So the Git-Bash is part of the standard install, giving you essentially a mini Linux install (or perhaps better phrasing would be a POSIX-compliant one?) and allows you to run a lot of tools/aliases/scripts developed for Git directly on Linux, and should be no different from a Linux Bash shell if you just happen to prefer that to Windows Cmd, with all basic command differences.
So I wouldn't say that there are "so many" different terminals. Unix/Linux has many different flavors as well (C-shell, Bash, Ksh, etc.). Powershell is rarely required for a regular user (per the comments, much more by developers), and Git Bash is unnecessary to run Git.
Isn't more options better - use what you like? :)

Migrating from cmd.exe to PowerShell or using PowerShell in place of other tool. When is it better to use PowerShell? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have been contemplating moving forward from using the cmd.exe command line program which provides a command line interface and a batch programming environment that extends the one
available using the old command.com program on the old DOS operating system. The cmd.exe
program has been available on Windows system for a very long time. However, I feel that
it has its limitations in terms of usability and flexibility.
I have heard that PowerShell can be used to manage various Microsoft products, and also
supports snap-in modules for third-party vendors, supports several very useful programming
constructs such as pipelines, and above all is tightly integrated with the .NET framework,
which of course makes the PowerShell programming language very powerful.
Perhaps this question is somewhat broad, but in view of the existence of several alternative
programming environments such as Python and Perl which are used for system administration
(these in many ways have slowly replaced shell scripts on Unix systems for more complex
tasks quite some time ago), I was wondering where PowerShell fits into the ecosystem,
and above all whether it is worth learning, and especially if it is worth learning
when someone already knows a tool such as Python or Perl which is also used for
system administration. Is PowerShell more of a system administration tool, or
is it a more general programming tool that does not require compilation,
unlike, say, C#?
What I can see as advantages is that it comes preinstalled, and that you can invoke
.NET API functions from within it.
If anyone can sort out a few scenarios demanding that it be learned, especially in the
case where other programming tools are already known, I would appreciate it. In particular
I would like to know, besides quick .NET scripting, what sort of tasks are generally speaking
more suitable to PowerShell programming.
Thanks.
The number one reason to use Powershell is that Microsoft is starting to push all it's product management tools to PowerShell. In fact, when working with things like Exchange, there are some things you can only accomplish with powershell anymore.
The second reason is that powershell is a full scripting language, dos batch command language is not.
The third reason, is that anything that is possible in .Net is possible in PowerShell (sometimes with a bit more work, sometimes with a bit less).
Also, there are some companies, like VMware that the only command line based interface released for their products is via a powershell snap in or module.
And, in my humble opinion, it is a pretty fun environment to work in.
Piping objects is an extremely powerful feature.
Going from DOS to Powershell is like suddenly acquiring opposable thumbs. It's bigger, more complicated, and for some few very simple tasks it's more cumbersome, and it doesn't take very long to wonder how you ever did without it.

How to improve one's bash/command-line skills? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Unfortunately I come from the Windows world and quite a newbie to Linux. I see people who are really productive due to their skills with BASH. Any pointers, tutorials, bools or suggestions to improve one's command-line skills? Something like http://www.commandlinefu.com/.
Check out superuser.stackexchange too, lots of good stuff there!
This is what I reference at least a few times a week:
Advanced Bash-Scripting Guide
And here is an actual List of Bash online-tutorials!
I would also like to emphasize what #serk's answer says:
Remove your GUI and you'll be forced to do everything via BASH
This is Very good advice! (and a well earned competing answer +1 vote ;)
In /etc/inittab change the runlevel to 3 from 5 and consequently you have to learn the shell because runlevel 3 means no GUI at all!
Remove your GUI and you'll be forced to do everything via BASH. That will force you to do the same tasks via the command line that you would have normally done via the GUI.
In addition to what's already been listed you can run man <command> to give you the "manual page" for a particular program. These are usually pretty good.
Many people you likely work with have customized bash and tools like vim/emacs to varying degrees. To see how people have customized things, you can go to their home directories and check out their "dot" files. "dot" files are hidden so to view them you'll have to run:
ls -a
Standard "dot" files/directories:
.bashrc
.bash_profile
.vimrc
.screenrc
.inputrc
Common dot file names:
.alias(es)
.function(s)
People sometimes also write common scripts and put them in bin or scripts directories.
You can learn a TON of stuff by checking out what others have done.
If you are just checking out linux on your own, you can look for these types of files online.
Since you're coming from windows, you may be using cygwin. If so, you can check out C:\cygwin\bin and C:\cygwin\usr\sbin for typical bash programs. You can also use cygwin on windows in general to allow you to continue to use bash when using your windows computer.

Is there an IDLE-like editor for ruby on Windows or Ubuntu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'd like to introduce my young cousin to a bit of programming. Ideally ruby, as that's what I'm familiar with. However finding a suitable text editor is a real pain. All I need of the editor is the ability to type a few lines of code, press 'Run' and get some results (or not, as the case may be). The simpler the editor the better, I don't need Netbeans, Eclipse etc. What I want to avoid is the necessity of using the terminal to run scripts, TextWrangler, Textmate and IDLE for Python can do this.
Unfortunately I need something that will work on Windows, or Ubuntu, otherwise I would have just installed Textmate on his laptop.
Any suggestions would be greatly appreciated.
You can do this in SciTE, which is bundled with the Windows Ruby installer or can be downloaded here. Click Tools > Go or press F5. It's an all-around good (and fast) editor with not a lot of bells and whistles.
This might require some configuration to make sure SciTE knows where your Ruby executable is. I believe the configuration for this is in Options > Open ruby.properties > command.go.*.rb.
On Ubuntu... How about the good old Gedit application? The Tool Launcher Plugin will enable you to run any external task (including the execution of the current open file.
Many thanks for all the suggestions, though having tried multitudes of editors, the option I've went with is Geany.
http://www.geany.org/
I couldn't get ScITE to work properly with standard input on either Windows or Ubuntu.
Ruby is a great language that could also be attractive to absolute beginners, however, the fact that the ruby installer does not include a basic editor that can be used in a self contained manner (to write and run scripts) really hinders its use for beginners.
This struggle to find an editor that could be used for writing and running ruby scripts almost had me resorting to python!
redcareditor has a "run" option under plugins -> execute
it's quick and dirty :)
I've used SciTE before for that sort of purpose. It reportedly works on Linux as well as Windows, but I haven't tried the Linux version myself.
Take a look at FreeRIDE for an IDE-type solution. You can also run code directly from the SciTE editor.
Well, on Windows, you can get E-Text Editor. It's basically a TextMate clone for Windows that runs TextMate commands and snippets.
30 day trial, then a little under $50 for full version.
I have no affiliation with the creators/owners of E-Text Editor
I use two editors that way, one is old school but only for Windows: Textpad , it also lets you enter parameters. Because of its popularity and power i'm trying to switch to Sublime Text, it is multi OS.
It takes some effort getting used to because i worked with textpad for many years but is is very powerfull and for Ruby development it is now my favorite workhorse. You can also find many tutorials and Youtube demos because of it's popularity.

Best "official" scripting language for Windows programmers [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Suppose there were several projects mostly maintained by smart interns, who eventually leave after a period of time. Scripts are used here and there in key parts, for example, to back up a database, rename it, zip it, move it over ssh, unzip it, and then to restore it with different settings. You know, the scripting stuff.
The programming languages for the application side is set, but those for scripts have been relaxed. Currently there are probably healthy mix of bash and .bat file, and maybe some Perl.
1) To avoid language proliferation, and 2) because I don't want to force bash upon future Windows programmers, I'd like to set an "official" scripting language.
Google picked Python for this, and it's famous for being readable, easy to learn, and having good library; however, I personally don't find it that readable compared to C-like grammar, Pascal, or Ruby.
In any case, if you were to be forced to use only one scripting language on a Windows machine (with Cygwin if you want to) for all scripting, what would you like it to be, and why?
Related religious wars:
What Is The Best Scripting Language To Learn?
Which Scripting language is best?
PowerShell - designed from the ground up to be a Windows scripting language, and it can hook into the CLR for advanced functionality.
(yes, I realize this doesn't run under cygwin... but why is that a requirement?)
When I've written cross-platform product installers, coding a UNIX shell script for Linux/Mac/Solaris etc. is really easy, but trying to do equivalent tasks in BAT is like working in the dark, underwater, with both hands tied behind your back. I can't state strongly enough that BAT scripts are a blight on humanity.
So what I've heard about PowerShell makes me happy. It's a life-saver for Windows developers. The only trouble is that I believe it's still a separate install, it isn't available by default (I've read that it'll be on Windows Server 2008 and Windows 7).
Oh well, it only took Microsoft 20 years to replace BAT scripts with something as capable as UNIX shell, so I guess I shouldn't be too ungrateful! >:-P
Get the installer for PowerShell here:
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
I'll try to provide an alternative - JavaScript and VBScript work fine too even on Windows versions long gone, and they don't need a seperate installation like PowerShell. ;) Of course, PowerShell has more power :P
I'd urge you to give Python a chance. It looks a little odd to 'C' programmers at first, but its easy to pick up and more importantly easy to remember. You are going to have interns of various skill levels using and modifying the code so you want something that can draw from a wide user base. And if you are going to go to the trouble of installing something new why choose powershell which is going to be a dead end for anyone using it.
Powershell. It's got the breadth and the depth, and is fully supported (now and in the future.) Unlike Cygwin, for instance.
The best scripting language I have come across for interface and control type applications in Windows is AutoHotKey. Anyone developing on windows should learn about this language... It can save you an enormous amount of time just automating retarded windows tasks...
One of the most useful tools I have come across for Windows is Texter
This utility is written in AutoHotKey and saves me from having to type anything more than a few times... An indispensable tool for a coder or anyone filling in forms or tickets...!
If you are like me and want to display nifty progress bars or splash screens while your script is doing it's magic (instead of a black/gray command prompt window), use AutoHotkey. Showing a progress bar is a PITA with JScript/VBScript (WSH) and/or PowerShell from what I've found. In AHK it's as simple as:
Progress, b2 m, ACME App, Doing some magic...
Also you can interact with almost any control in any window and automate apps which are not meant to be automated.
For your particular description, PowerShell sounds like a good way to go ... but I would make a strong case for JScript under WSH (or JavaScript under Rhino/etc.). Sounds like you like CYGWIN, but Powershell does not currently have support for other platforms (too much native stuff I think -- that's a separate discussion IMO, but Google should answer it).
I pretty much make the case here:
http://mikesharp.wordpress.com/2011/04/03/jquery-for-administrators/
Some highlights:
JavaScript is installed by default on every Windows OS after '95
JScript scripts work "out of the box" with Active Directory
ECMAScript is an open standard (which JScript is an implementation of)
Through ActiveX/COM JScript can do most of what Powershell can do and under Rhino it has the power of Java
Can be used to create HTA applications (and later, metro apps with WinRT/HTML5)
JScript doesn't have direct access to the .NET framework -- although there are a few 3rd party JavaScript engines in pure .NET that interpret it and can share objects with it like Jurassic and IronJS. Also wrappers like JavaScriptDotNet (around Chrome/V8).
Powershell will likely be faster than JScript under WSH, but the same might not be said of other 3rd party interpreters.
Just please don't go with VBScript (lacking try/catch, no real OOP, proprietary, deprecated, etc.).

Resources