A shell is software that lets users interact with the operating system, usually by typing at a command-line.

learn more… | top users | synonyms

0
votes
1answer
12 views

What is KNOPPIX shell's start-up file?

I'm trying to install virtualenvwrapper and I got to change the settings of my shell's start-up file (like .bashrc, .zhrc, .profile, etc) to write this: export WORKON_HOME=$HOME/.virtualenvs export ...
1
vote
0answers
18 views

How to show git branch in Emacs shell

How can I show the current git branch as part of the Emacs shell prompt? For example, I have this in my ~/.bash_profile (I'm on Mac OSX 10.9 Terminal): parse_git_branch() { git branch 2> ...
2
votes
4answers
104 views

Prevent cat from opening a binary file

Is there a way to prevent or prompt you when trying to cat binary files? Oftentimes I need to work with log files or data files, some of which are text and others not. It's easy to get mixed up, and ...
5
votes
2answers
96 views

ssh without using the user's default shell

There was a vote to close this as "unclear what you're asking". Apparently being thorough isn't a good thing, so I'll be terse: When you SSH to a remote host: is it possible to execute a program ...
0
votes
0answers
13 views

Wget which stops when it has a download limit

I have over 200 wget in screens on my server. I set a download limit in each low wget: --limit-rate=1K. The only problem is that after one hundred seconds, he considers as a finished one, so this ...
2
votes
2answers
80 views

What is the equivalent of root in Windows 8.1, and how can I open a shell in that context? [duplicate]

I've heard the equivalent of root is the "SYSTEM" account. But I used a tool called "RunAsSystem" to open a shell as SYSTEM, and I'm still getting "access denied" errors even though I know the files ...
1
vote
0answers
21 views

Starting Zsh in ConEmu in specified directory

ConEmu runs zsh under CygWin fine. I want to add a right click option to explorer to "Start ConEmu With CygWin Zsh In This Diretory" ConEmu provides an Integration settings page to set explorer ...
0
votes
1answer
30 views

Mac OS X seems to be unable to find directry that certainly exists

For some reason Mac OS X cannot find a directory I just made. Any idea why? sh-3.2# mkdir /Users/Administrator/Documents/drive/ sh-3.2# mount -w -t "hfs+" /dev/disk1s2 ...
0
votes
2answers
35 views

Adjusting a Unix shell script to create a CSV from a log file

I have a Unix shell script which generates output from a log. for i in HistSimBasislieferung hedgeAccountingF4PublicSend;do report1=$(echo -n $i:) date1=$(grep -e $i $PALME_CONF | grep "The job ...
5
votes
2answers
215 views

What's the differences between all the shells, zsh, bash, csh…, why are there so many? [closed]

My understanding of shell is an interpreter between me and the OS. So it will translate my command and call the right program to perform it. For this simple task, why there're so many shells existing? ...
1
vote
2answers
36 views

Spaced string variable as command parameter inside shell script

How can I store a spaced string in a variable and use it as a command parameter inside a shell script? This is what I'm trying to do: DESTINATION='/mnt/External Harddisk' ...
0
votes
0answers
22 views

Having trouble building Vagrant bash script

I'm trying to set up a bash script provision to help build my virtual machine with Vagrant, but I'm clearly doing something wrong. Unfortunately the Vagrant docs don't provide any examples more ...
-3
votes
1answer
51 views

Scripting for table data in a file

I have the following data file, EMP.txt: SNO,NAME,GENDER,COMPANY,EMPID,SALARY,JOINING_DATE,PHONE_NO,LOCATION 1,sravan kumar,M,ibm,1095,20000,01-SEP-2014,7651523,HYDERABAD 2,Vijay ...
0
votes
0answers
8 views

How to make Konsole invoke konsole -ls for all users?

I admin a linux domain for students. The students use their lab workstations in graphical mode, but often use Konsole on KDE for ssh and programming tasks. I know Konsole can be configured through ...
0
votes
1answer
18 views

Keyboard shortcut to kill a script containing multiple wgets?

I have a Python script that wgets a load of files: for year in range(2010, 2015): for month in range(1, 13): filename = url filename += "/T%s%s_BNFT.CSV" % (year, month) ...
3
votes
2answers
178 views

How can I quit the application opened from terminal in Mac OS X?

I know we can start an application from command line like: open -a "/Applications/Google Chrome.app"/ How can I quit that application from command line?
1
vote
1answer
20 views

Shell Script unable to execute passed command as input

I am trying to execute command from script but unable to execute it. script :command.sh #!/bin/bash a=$1 b=$2 echo "a=$a" echo "b=$b" `$a | $b` Execution command : bash-3.2$ ./command.sh "tar ...
1
vote
1answer
18 views

How to create filename.tar.Z file on SunOS operatting system

I am trying to create filename.tar.Z file using single command on SunOS but it doesn’t seem to work: bash-3.2$ tar c DIR | compress >DIR.tar.Z tar: /dev/rmt/0: Permission denied bash-3.2$ Other ...
0
votes
2answers
59 views

unix Command doesn't work

The command: tar c DIR | compress >DIR.tar.Z which works on a Debian-based Linux, fails on SunOS. Why?
0
votes
0answers
15 views

How to execute tar and compress command on Folder in single step

i am trying to execute shell script with two command as parameter Shell script : #!/bin/bash a=$1 b=$2 `$a | $b` Input : "tar -cf DIR.tar DIR" "compress DIR.tar" Objective : create ...
7
votes
2answers
107 views

how to list current path mode?

If the current path is /data/db_1, and /data has three subpath, db_1, db_2, db_3. I want to know db_1’s modification, owner and group. Currently I use ls -li /data |grep db_1 , but I think there ...
0
votes
1answer
23 views

Running the command “bochs -q” from Cygwin fails

I'm having troubles to execute the command "bochs -q" from Cygwin. I have installed the XV6 operation system in my C drive. I'm using Cygwin in order to compile the XV6 files, that is execute the ...
0
votes
1answer
88 views

Attempt to hide console using Command line, Run, Exec and Pipe in VBScript

I'm using Zbarimg which (I believe) outputs its data to STDOUT. So at present, a cmd string within a VBScript executes the command and stores it in a variable, thus: ...
0
votes
1answer
35 views

Start two scripts that run indefinitely in shell script

I'm a webdev and I am using JSX compiler and SASS preprocessor to compile my .jsx and .scss files. When I start working, I launch these two separate commands: jsx -x jsx jsx js --watch --no-cache-dir ...
1
vote
2answers
37 views

Is there a way to have sh/bash/zsh “case” use a variable for a test value?

I'd like to have something like the following: #!/bin/sh # ... other stuff ... # some relatively static possibilities (srsp): srsp='this|or|that|the|other' # more other stuff case $something in ...
1
vote
1answer
40 views

Linux shell: how to add prefix string to stderr message?

I am running several tasks simultaneously at background. command_a | tee > command_a.log & command_b | tee > command_b.log & If everything is fine, then messages will be saved to log ...
0
votes
2answers
41 views

What are the differences between “sh file.sh” and “source file.sh”?

I am trying to set up a cron job to run regression tests for software that usually runs in an interactive environment (CASA, for the morbidly curious: http://casa.nrao.edu/). I have a shell script, ...
3
votes
1answer
49 views

how to control users login on Linux machine according to configuration file

I use the PAM to authenticate users login info from - http://linux.die.net/man/8/pam_listfile in my Linux red-hat machine I have 5 diff users user1 user2 user3 user4 user5 I want to enable ssh ...
1
vote
3answers
70 views

sudo command won't run from script

Linux Mint. Ok, this is going to be seriously basic but for some reason, I am mis-understanding how this works. If I type the following commands, everything works fine: cd ...
0
votes
0answers
26 views

How to pipe arguments into stdin?

I am trying to generate a private key using keytool command, but it asks me for many details like my key passphrase, my name and my organization details. I want to pass all the inputs in one command. ...
0
votes
0answers
75 views

Crossfading Video AND Audio with ffmpeg

This Super User answer crossfade between 2 videos using ffmpeg has got me so far, but now that I have tried many solutions and seen every SO link out there, it's time to ask you all for help. I am ...
0
votes
1answer
34 views

tmux: Detect which process runs in the active pane

Is there a way how to detect what process runs in the active pane? tmux: Find "my" window, check if it's active is related, however, it deals with the detection from within the pane. I ...
0
votes
1answer
61 views

What do these parameters do?

What is the meaning of the switches and parameters of this command? exec su -s /bin/sh -c 'exec "$0" "$@"' root -- /opt/nsq/bin/nsqd Specifically the -- part and what exec "$0" "$@" is supposed to ...
2
votes
1answer
53 views

strange if statement behavior on linux

I am writing a shell script and have come across some weird if behavior. My question is simple, why does [[ "╝" = [█] ]] evaluate to true? Is it because they are both uncommon ascii characters? On ...
0
votes
0answers
21 views

`newgrp` breaks source-ability of shell script

This is my minicom.sh, which I can source successfully with source minicom.sh: minicom --device /dev/ttyUSB0 --baudrate 115200 --color=on However, when I change the content of minicom.sh to this, ...
1
vote
1answer
82 views

Exit bash script when curl gets a non 200 HTTP status

I have a bash script setup to perform a few curl requests for currency in EUR INR JPY do curl -i --data '{"currency": "'$currency'"}' -H "Accept: application/json" -H "Content-Type: ...
1
vote
2answers
25 views

Not creating new file while output redirection

I'm using this for output redirection: cat filename | grep 'dis' | wc -l > test.txt But I do not want a zero byte file created if no result is found from the grep command. Is there any way this ...
0
votes
1answer
101 views

ssh ForceCommand with Match

I try to setup a ssh server which is a kind of jumping host to other servers reachable via ssh. For that I use the ForceCommand like this: Match Group g_ssh ForceCommand nc -q0 my_internal_server 22 ...
1
vote
2answers
37 views

Wrong exit status upon evaluation of command substitution via ssh?

I've the following simple shell command which I'm expecting to fail and it does on my local: $ DIR=$(false) && echo ok || echo fail fail $ sh -c 'DIR=$(false) && echo ok || echo fail' ...
0
votes
1answer
32 views

Custom bash 'context' when running from FISH

First of all, I'm on OSX10. My default shell is BASH, which I have set up (through .profile and .bashrc) to automatically run the FISH shell when I open my terminal emulator. This allows me to set up ...
0
votes
1answer
126 views

How to get count of files in directory using command,exe in c# app

I want to use the Process class to execute a command.exe method to return the number of files in a parent directory. It has to be using the command.exe (various reasons). This is my code: ...
0
votes
1answer
72 views

Enable autocomplete in archlinux adb shell

In archlinux, when using the command adb shell provided by the package android-tools to obtain a shell on an Android device, the auto-completion using Tab is not working. Everything else is working ...
1
vote
0answers
19 views

Run shell commands in windows background

Hope you all are in good health. I have a silly question. Can we run shell commands in Windows in background and check it later whether it is still running or not. For example, we have "screen" ...
0
votes
1answer
31 views

Executing Perl command from shell script not resulting into anything

I am trying to execute the below command from a shell script: perl -pi -e 's/Ç/|/g' diff_new_old.dat This command gets executed without any errors, but the execution doesn't do the intended ...
1
vote
2answers
75 views

Bash: can't type 'e' or I'll get infinitely repeating 'H's

At my workplace, there are several independent networks I work with, all running various versions of RedHat Linux 4, 5, and 6. On one of those networks, I can't use bash (or, as I'm finding out, ...
0
votes
1answer
26 views

How can I make shell autocomplete the beginning of a filepath?

I have a project with a deeply nested folder structure. Most of the time I know the name of the file I want to work with, but the folder path is too long/complicated to type when I want to edit it, ...
0
votes
1answer
47 views

Use shell provided by non-root user

What is a good way for a non-root user to use an executable that is not in the system's list of shells as if it were the user's actual shell? I'm trying to do this with two different versions of ...
3
votes
2answers
39 views

How to tell of a GZip file is still being written while being copied

I am getting a gzip file in a path. Input Folder Path: <server>/input_gate I want to check whether the GZIP file I am getting in this folder are valid? I have used the following command. It ...
1
vote
1answer
32 views

netstat showing multiple responses for single listening process

Why does netstat -lntp show multiple responses as 0.0.0.0:22 & :::22 for a single sshd process? Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program ...
1
vote
1answer
249 views

Why does root cron job script need 'sudo' to run properly?

I'm running this simple script on my Raspberry Pi to auto update so I can forget about it. It also keeps a log that says whether the update was successful. The script is update.sh: #!/bin/bash echo ...