## shell

### What should a longtime Windows user know when starting to use Linux?

We've finally moved our websites to a decent host, and for the first time we have Shell Access. I know very little about using Linux, I can navigate through the file system, read files with Vim and I'm aware of the man command, and I have been able to work out solutions to problems as they show up (eventually), but I know I'm unaware of...

### Linux shell equivalent on IIS

As a LAMP developer considering moving to a .Net IIS platform, one of my concerns is the loss of productivity due to lack of shell... Has anyone else had this experience? Is there possibly a Linux shell equivalent for Windows? ...

### Shell scripting input redirection oddities

Can anyone explain this behavior? Running: #!/bin/shecho "hello world" | read var1 var2echo $var1echo$var2 results in nothing being ouput, while: #!/bin/shecho "hello world" > test.fileread var1 var2 < test.fileecho $var1echo$var2 produces the expected output: helloworld Shouldn't the pipe do in one step what the redirection to t...

### Better windows command line shells

Is there a better windows command line shell other than cmd which has better copy paste between Windows' windows and console windows? ...

### Unix shell file copy flattening folder structure

On the UNIX bash shell (specifically Mac OS X Leopard) what would be the simplest way to copy every file having a specific extension from a folder hierarchy (including subdirectories) to the same destination folder (without subfolders)? Obviously there is the problem of having duplicates in the source hierarchy. I wouldn't mind if they ...

### Parsing XML using unix terminal

Sometimes I need to quickly extract some arbitrary data from XML files to put into a CSV format. What's your best practices for doing this in the Unix terminal? I would love some code examples, so for instance how can I get the following problem solved? Example XML input: <root> <myel name="Foo" /> <myel name="Bar" /> </root> My desi...

### How do you use ssh in a shell script?

When I try to use an ssh command in a shell script, the command just sits there. Do you have an example of how to use ssh in a shell script? ...

### How to redirect all stderr in bash?

Hey! I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending 2> a_file to each command. By default, these stderr streams are redirected to the stdout of an interactive bash. I...

### Where can I find a graphical command shell?

Terminals and shells are very powerful but can be complicated to learn, especially to get the best out of them. Does anyone know of a more GUI based command shell that helps a user or displays answers in a more friendly way? I'm aware of IPython, but even the syntax of that is somewhat convoluted, although it's a step in the right direct...

### How to escape os.system() calls in Python?

When using os.system() it's often necessary to escape filenames and other arguments passed as parameters to commands. How can I do this? Preferably something that would work on multiple operating systems/shells but in particular for bash. I'm currently doing the following, but am sure there must be a library function for this, or at l...