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

learn more… | top users | synonyms

1
vote
0answers
7 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
1answer
20 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
0answers
8 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
26 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
31 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
12 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
320 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
12 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
17 views

Linux Command to set TCP window size [closed]

I want to send TCP packet with window size 65535 (0xffff). I m looking to set the TCP window size to 65535 on my linux system. I know that there is the sysctl command but I could not find how ...
0
votes
0answers
14 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
27 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
62 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
11 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
29 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
131 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
38 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
0answers
12 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
3 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
21 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
19 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
23 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
26 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
59 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
22 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
16 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
13 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
15 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
18 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
32 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
38 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
29 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
23 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
31 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
634 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
17 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 ...
0
votes
1answer
46 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
98 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
10 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
43 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
26 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
28 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
17 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 ...