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

learn more… | top users | synonyms

2
votes
0answers
25 views

Can one start shell from save file dialog

Using ubuntu. If one tries to print to a file, the save dialog opens. Is there a way one can execute the shell (or terminal) from the save file dialog file name entry box?
1
vote
1answer
122 views

shell: “can't shift that many” error

The following script works fine in one of my machines, printing 1 then 2: #!/bin/sh echo "1" shift echo "2" On another machine, however, it produces the following output: 1 ./script.sh: 4: shift: ...
0
votes
2answers
59 views

Unix/linux shell scripting floating point division

I have to divide two floating point values and store it in variable. My code below v_missedvol=4003.03 v_allvolume=3003.03 v_vol_temp= $(echo "$v_missedvol / $v_allvolume" | bc -l ) the result ...
1
vote
0answers
31 views

monitor command outputs in separate windows within a terminal

For a list of input text, I want to execute a repetitive command using each element from the list. In addition I also need to monitor the results of each of these commands in parallel. So I am looking ...
0
votes
1answer
62 views

How to run a script on ssh login and run another script after the first terminates?

I'm trying to run a script/shell just after I login via ssh to my host with a "guestUser" the mission of this user is to connect to another remote host via ssh, I've created this user on my host: ...
0
votes
1answer
42 views

How can something like the “passwd” file contain a shell?

I was doing some reading, and in Jon Erickson’s “Hacking, 2nd Edition: The Art of Exploitation” on page 89 I read that: passwd file contains account information for every user on the system, ...
0
votes
1answer
106 views

Output of the ps command and understanding the flags

Ubuntu 12.04 LTS using bash. I tried running the ps command from a Java program using the Runtime and got some unexpected output. Upon closer inspection I realized that it was the output of: ps ...
2
votes
2answers
49 views

Setting the variable $USERNAME has no effect

Setting the variable USERNAME has no effect. Accessing the variable always returns the current logged in user. james@localhost:~$ USERNAME=foo james@localhost:~$ echo $USERNAME james I could not ...
0
votes
1answer
49 views

How to create a command shortcut in BASH or ZSHRC shells?

I know how to create an alias or a PATH however those are both used to navigate folders. How would you create a shortcut to say quickly type the following commands every time? alog = tail -f ...
0
votes
1answer
47 views

How to “sort” .torrent files by tracker?

I have a directory with a lot of .torrent files, and I want to get only the one with specific tracker(s). Is there a way to find them? The only way I've found so far is to add them all in a ...
0
votes
1answer
49 views

Get the Group name which has GID=0

I wanted to write a shell script in which it needs to give the group name whose GID=0.I used awk command like this, awk -F ':' {$3==0} /etc/group | cut -d ':' -f1 It works fine in redhat,aix.But ...
1
vote
2answers
50 views

ZSH PS1 adding spacing when tabbing

I'm having an issue with zsh/oh-my-zsh with my custom PS1 prompt (that I brought across from bash). When I use the built-in zsh/oh-my-zsh prompt and tab for auto-completion, this works as expected. ...
7
votes
8answers
710 views

Remove linux file named with set of shell responsive characters

I've created a file named \;:$"\' to test a software of mine. I ended up with an error, because I cannot delete the file property. I'm trying to find a precise character combination to remove it via ...
0
votes
0answers
26 views

shell script to generate a log file for VM Backups

we are using PHD virtual backup to trigger backups for VMs and now i want to generate a report of all VMs in a file consisting of VM Name, Date and Backup Time and mail it to my ID at particular ...
3
votes
1answer
326 views

Remote SSH Commands - bash bind warning: line editing not enabled

I am using bash 4.3.11(1) and have the following history plugin installed (via .bash_it): # enter a few characters and press UpArrow/DownArrow # to search backwards/forwards through the history bind ...
2
votes
1answer
245 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
1
vote
1answer
16 views

Why is the exec command used for file descriptor redirection?

In UNIX shells like Bash and Korn shell exec is used for two specific uses. Its use to replace the current program with another, as in exec prog is understandable. The name exec is a contraction ...
2
votes
2answers
158 views

Set urxvt shell without chsh?

I want to use bash as my default shell (so that it's simpler in tty) but I want to use zsh when I'm in X using urxvt. Is there a way to do this?
0
votes
3answers
31 views

How do I move files from many child directories into my root directory?

I'm using bash on Mac 10.9.5. I have PDF files in many directories, all one level from the root ... Dir_1/abc.PDF Dir_2/def.PDF Dir_3/ghi.PDF Dir_3/jkl.PDF ... How do I write a shell command to ...
1
vote
0answers
29 views

Port forwarding between two different networks [closed]

I have three Linux computers - A, B, and C. I have a TCP server that runs on C. B and C share same network and B and A share the same network. I want to send commands (and receive results) from A to ...
0
votes
1answer
26 views

how to add all the integers between two lines with a pattern and print

I have an input file (sample.txt) Sat 02/28/2015__19:32:37.63 262,404 K 100,964 K 112,052 K 124,628 K Sat 02/28/2015__19:37:38.41 262,408 K 100,964 K 112,056 K Sun ...
0
votes
1answer
20 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
36 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
148 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
145 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
29 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
120 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
1answer
84 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
148 views

Mac OS X seems to be unable to find directory 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
46 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
266 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
48 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
34 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
52 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
13 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
21 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
235 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
26 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
28 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
92 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
27 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
112 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
42 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
259 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
48 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
82 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 ...
2
votes
1answer
146 views

Command Not Found When Executed via PHP shell_exec()

I want to execute following command on my Ubuntu server using php: android create project --target 8 --name $fname --path ./$fname --activity MainActivity --package $fpack 2>&1 The above ...
1
vote
1answer
103 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
57 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
66 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 ...