Tagged Questions

The shell is unix's command-line interface. You can type commands in a shell interactively, or write scripts to automate tasks. Use this tag for questions applying to /bin/sh and most compatible shells (ash, bash, ksh, zsh, …).

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account.
I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...

When limiting a user to a single command via ssh, what default shell should be used for the user? This is a follow up to how can shellshock be exploited over SSH? I have a machine that is running an ...

I'm attempting to open multiple xterms and run a command as an SAP user via sudo using pssh. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in the servers ...

I'm trying to resolve an SSH connection issue on an Android phone running SELinux in "Enforcing" mode. The problem is that any SSH connection that tries to allocate a pseudo-terminal (/dev/pts etc) is ...

I'm getting a segmentation fault with the following script when it's more that one child dir past the pwd. The program kills with the error message and I have to reset the shell.
For example: I start ...

Question says it all on the tin. Can someone explain to me what goes on here ? I'm trying to find out how to background a process in a script that calls another function and reliably terminate it when ...

If I have two backgrounded processes that produce input to STDOUT or STDERR (e.g., two installation scripts), is there an easy way to make these two output streams distinguishable? I guess I can pipe ...

Looking for a guide to optimising regexp matches in bash.
I have a script that loops over a very long list of URLs looking for patterns. Currently it looks a little like the fragment below. Is there ...

I was playing around with creating and killing process groups on linux ( ubuntu )
I am trying to kill a process group and am being driven crazy by the fact that pkill -P $ID works while kill -- -$ID ...

I have openWrt installed on a TP-Link TL-WA901N/ND v3. I don't have luci package installed because I don't have enough space, so I can only do thing via cli.
What I'm trying to achieve is to create a ...

I want to set my laptop to load an image in the shell's background or set the background color to red if I'm connected via SSH.
How can this be done? With a bash function in .bashrc?
I have: Set the ...

Is it possible to make zkbd ignore $DISPLAY variable? I have set up when I log in to different X sessions and it is annoying if suddenly I need to reenter/copy configuration (and I have no idea why ...

I have this script. I put it in ~/Desktop. I view the script on my desktop in a "Folder View" widget. When I click on the script, I get list of users, then I get an authorization dialog box ( for a ...

I want to provide a menu in a shell script that offers a check list of SQL scripts to run.
I actually need to execute the selected SQL scripts but it's about 20 of them and that make it hard to cover ...

I am new to awk programming and am using gawk to extract trace information from a mrt file in order to use it further for analysis. I have successfully been able to extract trace information from a ...