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
0answers
2 views

Custom Windows shell hosted on the network

We have a custom kiosk-style executable that we are using as a shell on Windows 8.1 machines. We'd like to host it on the network so that it's easy to update as desired. The problem we have is that ...
0
votes
3answers
34 views

How do you write to a file within the command line?

Specifically mac, but for future reference for those that come across this post, this could be on any OS. So am learning the command line, and one utility (perhaps the only one) which seems to be ...
0
votes
1answer
21 views

Is it possible to delete directory when in the directory in shell

I have a directory which I run a program in. /usr/bin/my-dir I need to run the program from within the directory So I must go cd /usr/bin/my-dir ./my-program I have a script that from a ...
1
vote
2answers
23 views

Launch interactive shell command as an emacs buffer

I'd like to run a shell command that asks a few interactive questions before proceeding, from within Emacs. The functionality I'm looking for is like xterm -e <command>, only with an Emacs ...
1
vote
1answer
26 views

What is the best policy for running GUI programs from CLI to silence non-error messages?

When, on Linux, running graphical programs (such as Sublime Text for example) from the Terminal, the program runs fine but logs on the console messages that are not exactly failures, nor useful log ...
0
votes
0answers
9 views

Bash history deduplication causing dangerous multi-shell behaviour

I am using the following code in my .bash_profile to filter and de-duplicate my bash history: shopt -s histappend HISTSIZE=100000 HISTFILESIZE=100000 HISTCONTROL=ignoredups:erasedups ...
2
votes
1answer
11 views

How can I safely remove timeout from a script?

I started a script with timeout --signal 2 --kill-after 10 14400 and now decided that it should rather run as long as it must, so I need to remove that timeout from the running script. top -p ...
0
votes
1answer
26 views

How to stop tail -f except using kill

I want to write a shell script to detect if my program starts up successfully. There is a log file created by the program. When the log file contains a new line: Server startup in, then stop the bash ...
1
vote
1answer
21 views

How to call environment variables in runas command for right click context menu

I am having trouble with using environmental variables with using runas when using the command in the registry for a right click context menu command. I have tried different methods of escaping the ...
1
vote
3answers
44 views

How To Quickly Switch Paths (in Bash)

Sometimes, usually when installing packages with brew, I want to disable/remove certain parts of my path, and then later restore them. I haven't been able to find an easy way to do this, and while I ...
2
votes
1answer
13 views

My host offers SFTP only, not SSH. Can I still use private key authentication? i.e., does SFTP use SSH implicitly?

I'm using WP Engine as my host. They are a managed host and they never offer shell access. However, they do allow setup of SFTP accounts. My (limited) understanding is that SFTP still uses an SSH ...
0
votes
2answers
34 views

How to copy file using awk based on time creation to some directory

I trying to copy a file to directory using awk filter based on time creation file #!/bin/bash dir=/home/resaputra23/pyexample/python2/* des=/home/resaputra23/pyexample/backup/ file1= stat $dir | awk ...
0
votes
0answers
13 views

Mac OS X: Shell command for Accessibility -> Sound -> Play stereo as mono? [duplicate]

The question is in the title. I need a quick way to turn the feature on and off every now and then. Is there a bash command for it?
3
votes
3answers
35 views

No path, or command history through SSH when logged in to server as someone other than root

When I SSH into a server, as anything other than root, it only shows a $ and not the path. It also won't allow me to press the up key and see the command history when I don't SSH in as root. How do I ...
2
votes
1answer
13 views

Wrapping `time` (and similar keywords) in call from another script

I have a Bash script (let's call it clock) which should work as a wrapper similar to the time keyword in Bash, e.g. clock ls should do something and then run ls. Here is an example of this script: ...
7
votes
4answers
335 views

Running `exec` with a Bash built-in

I defined a shell function (let's call it clock), which I want to use as a wrapper to another command, similar to the time function, e.g. clock ls -R. My shell function performs some tasks and then ...
2
votes
1answer
15 views

How to save user made zsh shell functions and aliases

Shell beginner here! I'd like to create aliases and functions in zsh shell to speed up my workflow. For example: tw() { open -a //Applications/Textwrangler.app "$*"; } The function itself works, ...
0
votes
0answers
16 views

shell script to change bootloader background

I'm trying to create a shell script on openSUSE to change the bootloader background from the files /etc/default/grub line: GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png with the new ...
2
votes
2answers
32 views

How can I find what a Windows PC thinks its name is, given its IP?

How can I find out what a remote Windows PC thinks its host name is, given its IP? From Windows cmd.exe or a Linux shell. I'm not interested what a DNS server thinks the host name is for an IP, just ...
4
votes
2answers
63 views

How can I issue a command on my local machine from within an SSH session?

Example use case: I am working on my laptop running Mac OS X (A) and am logged into my development server (B) via SSH. I have a script which will generate a GitHub URL for the file/branch I ...
0
votes
0answers
15 views

Execute a .sh file from the desktop in intervalls

We've got a bad hoster, that only allows cronjob in 15 min. intervals. However sometimes we get time critical stuff and we need to do it in faster intervals. That said, the hoster allows an execution ...
1
vote
2answers
35 views

How to make Zsh not store failed command

Problem I'm using oh-my-zsh and Antigen to manage my Zsh. Sometimes I will accidentally enter a wrong/failed command into Zsh and it is very annoying when the zsh-autosuggestions plugin throws up ...
2
votes
1answer
137 views

How to make a bash script that names files with today's date

I'm trying to make a script to back up my we servers, but I have very limited knowledge with bash scripting. I want the script to name the backup file ht-"today's date". How would I go about doing ...
0
votes
2answers
40 views

How to echo string of another string shell variable

We would like to echo the value of a shell variable which has another variable string in its variable name. eg: we want the following output var1=1 var2=2 We tried several various forms similar to ...
0
votes
1answer
24 views

How to disable (and re-enable) notifications on GNOME Shell version 3.8.4 from the command line?

I am running Centos 7 with GNOME-Shell 3.8.4. I can happily disable all notifications from the top-right menu, as pictured: I need to do that from the command line, though, because I need to ...
0
votes
0answers
4 views

Running a slideshow on Ubuntu and and nfs

Seen this question and answer. I need to run a slideshow whose images are hosted on an nfs. Would this snippet of code while true ; do for i in * ; do cp "$i" ~/slideshow.jpg ; echo $i ; sleep 5 ; ...
1
vote
1answer
24 views

Can't find the good Cygwin shell executable

I am working on Windows 7 and I need Cygwin for my project. I am trying to launch the Cygwin terminal from a Java programm and then write command lines but my problem is that I can't find the right ...
1
vote
1answer
20 views

Windows 7 system resource as folder name

I hope it is not a stupid question, but is it possible to set a folder name to a system32.dll localised string resource? I can set the icon easily on the properties window (eg. from imageres.dll), but ...
0
votes
1answer
17 views

Remove a specific string common in multiple lines in a CSV file using shell script

I have a CSV file which contains 65000 lines (size approximately 28 MB). On each of the lines they have a path in the beginning in the format of: c:\abc\bcd\def\123\456. Now let's say the path ...
0
votes
2answers
27 views

Redirect stderr to second terminal / tty

I've tried things like rse to differentiate standard-output and standard-error streams from a program; but I'd really like the option of viewing the two in separate terminals, without redirecting to a ...
11
votes
4answers
1k views

Who deals with the star * in echo *

Who deals (interprets) the * in echo * Does the echo see the star or the shell take care about it and return a list of filename .. What about cp temp temp*
1
vote
1answer
17 views

Some characters in zsh don't show until the key is released

When inputting specific characters in zsh shell (in my case e and ;) they don't show up immediately after pressing the key. Instead they only show up a short time after releasing the key. When these ...
0
votes
1answer
28 views

How to use custom shell on windows 7 when connected remotely via thin client

We have a Win 7 PC that runs software within a custom shell. This shell blocks users from the operating system depending on who is logged in. When no one is logged on, the OS is inaccessible. This ...
0
votes
0answers
18 views

Multiple replace - using sed or awk

I have a code snippet like below CREATE TABLE TABLE1( ID integer NOT NULL, ROW_CREATED varchar (26) NULL, BATCH_LOG_ID integer NULL, TRANSACTION_TYPE varchar(5) NULL, PARTITION_COL integer ...
0
votes
4answers
63 views

While loop Bash script that outputs how many users use a certain shell

So I am stuck on trying to create a bash script while loop function that takes the input from /etc/passwd and outputs how many of users use bash, nolongin, csh, and ksh. I believe I am supposed to ...
1
vote
1answer
28 views

The application “SomeApp.app” can’t be opened

Problem: after downloading an application in OS X Yosemite (10.10.x) trying to open the application (either from the command-line or by double-clicking the application) produces an "The application ...
2
votes
0answers
17 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
17 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
1answer
17 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
20 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
35 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
39 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
32 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
35 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
24 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
30 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
27 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
32 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
7answers
639 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 char combination to remove via rm, but I ...
0
votes
0answers
18 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 ...