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
20 views

How do I launch/use Cygwin as the shell for TortoiseHg?

In the settings for TortoiseHg, there is an option to select what shell you would like to use. The two defaults listed are, as you might expect, "windows_command_prompt" and "powershell" but I would ...
0
votes
0answers
37 views

iTerm2 (OS X) change background image for current window from shell?

iTerm2 allows to set a background image or color, either for the current window or the default (used for all new windows). However, can I also set the current window's background image or color from ...
1
vote
1answer
47 views

CTRL+R in shell - if I go past the command I want, how do I get back to it?

I'm feverishly hitting CTRL+R to find some command I used awhile ago, when suddenly I get to it. By reflex, I continue hitting CTRL+R, passing it for something further back in the shell history. How ...
0
votes
2answers
366 views

How to run a bash script via absolute path?

I have a file: /Users/danylo.volokh/test/test_bash_script.sh Content is very simple: #!/usr/bin/env bash echo "-- print from script" I'm in folder "danylo.volokh" This command runs fine: ...
-1
votes
1answer
10 views

Printing file starting from matched line

Suppose there's a file with a structure like this Useless line 1 Useless line 2 ===USEFUL STUFF STARTS HERE=== Useful line 1 ... How can I print all the lines after the first line that matches ...
0
votes
2answers
37 views

Will changing windows shell affect my ability to run windows programs?

I have recently started using Linux on my laptop and I really like it. Especially I am overwhelmed by the ability to customize the desktop environment in Linux. I start reading about it and I learned ...
-2
votes
1answer
14 views

How to find & replace a pattern with string in ruby?

My file is: [root@test etc]# cat nrpe.cfg command[check_users]=/usr/local/nagios/libexec/check_users -w 30 -c 35 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c ...
0
votes
2answers
23 views

How to add sizes of all files with the same name in UNIX Shell scripts

I'm new here and I want to ask how to add sizes of files with the same name? My file names are actually different from each other but I cut them so I could get files that are grouped together. here ...
3
votes
0answers
12 views

Wrap git's shell script to add bashrc or equivalent start-up commands

My server has a git user that handles all git access. You can't log in with it. It's only for git access. That works because GIT comes with a handly shell /usr/bin/git-shell. Login feedback: fatal: ...
1
vote
1answer
102 views

How to get bash-style autocompletion in zsh, (for git command)

I switched to zsh and find it better than bash, but I have a problem with oh-my-zsh's (hereafter "OMZ") autocomplete feature. When I type git chec, OMZ completes that to git check; in bash it gets ...
29
votes
8answers
7k views

Is it possible to restart a computer in response to an email notification?

I'm looking for a way to reboot machines after getting an email notification. The setup I want to use this on is a render farm. We have 5 boxes with 8 Nvidia GTX 980Ti in them. They're running ...
0
votes
1answer
41 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: /...
0
votes
1answer
28 views

Decompress all gz files in a tree

I am working on an Ubuntu 14 server. Trying to create a tar.gz backup of my website, I accidentally gzipped every individual file in my /var/www/ directory, recursively. Now the whole tree consists ...
1
vote
1answer
22 views

Access to line arguments in shell script

I wonder if there is possible to access full command line call in shell script. In my script I need to pass it further. I find that there are $@ and $* accessors, but it do not pass all the characters,...
0
votes
2answers
14 views

display number of files in current moment like what tail -f do

I have a folder which files are copied to it like /home/my/. I want to run a command which shows number of files inside it in real time like what tail -f do with file contents. I know I should run ls *...
0
votes
1answer
24 views

Shell Save the array element values in the variables

I need to copy the files from one folder to another, here source and destination information are in the text file. File content: res.txt /var/lib/jenkins/jobs/Android\ Gradle\ test\ build/workspace/...
-6
votes
1answer
33 views

converting shell script to bash script

can anyone help me by converting this shell script to bash script pl. my shell scrpit is as follows #!/bin/bash IN="ifa_in_B2C=ifa_inB2C;ifa_in_ERP_Soap=ifa_inERP;sm=sm_main;tp=tp_main;trp=trp_main;...
0
votes
1answer
20 views

bash autocomplete fails with wildcard

Using bash on this this system: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux The sequence: cd /tmp touch test1.txt && touch test2.txt && ...
0
votes
1answer
21 views

Shell how to use a command to every regular file in and below the Dir

So what I have to do is find all regular files within and below the directory. For each of these regular files, I have to egrep for pattern($ARG) and find out if the output of the file matches the ...
0
votes
1answer
25 views

'\' backslash in single quotes giving unpredictable output in shell script linux

the output for the following two commands are same: echo 'my\name' | grep 'my\\name' my\name and also the output for the next command is also same, echo 'my\name' | grep 'my\\\name' my\name Can ...
0
votes
1answer
47 views

Use zsh if possible, bash if not

I have a couple of ubuntu machines and my home folder is shared across all of them. I think there is another computer, which holds the folder and it is mounted as I log in, not sure tough, I didn't ...
0
votes
2answers
44 views

Why the simplest Shell-Script isn't working?

I want hide the path in the Terminal and for that reason I typed: export PS1='> ' command which I found online with positive result. I thought to make it to a shell-script in order to not type ...
0
votes
0answers
60 views

Difference between su -c and runuser -l -c

I need to run some command lines as particular user in a shell script. I've found (at least) two way: su user -c 'command' runuser -l user -c 'command' Is there a significant difference between ...
0
votes
1answer
29 views

How to programatically modify systemd unit files?

I'd like to edit a systemd's unit file from a shell script. I want to change the unit's only ExecStart line. Using systemctl edit looks smart to me, but the command needs an editor set as ...
0
votes
0answers
39 views

What these options exactly mean in ifup command in Linux?

Please can someone explain to me more (maybe with examples ) about the following options in ifup command in Linux. This is what I found on the internet, but with no more details about it : --...
1
vote
3answers
440 views

How do I install Bash on Ubuntu on Windows 10?

I'd like to install the Ubuntu Bash on my Windows 10 machine. How do I do that?
0
votes
3answers
75 views

Can I work on the bash shell on windows now?

I want ask you about the bash shell on windows .. can I work on it now?? and how I can run it? because I try to run bash on CMD and this message appears C:\Users\Pc>bash Pc@User /cygdrive/c/...
0
votes
3answers
70 views

What does `grep -1` do?

I'm trying to make sense of the following shell command, to get a list of packages that can be updated: dpkg --get-selections | xargs apt-cache policy {} | grep -1 Installed | sed -r 's/(:|Installed: ...
0
votes
2answers
53 views

What exaclty is <() in bash (and =() in zsh)?

I'm pretty confortable with bash, but recently I ended up in a substitution I didn't know. What exactly is <(<command>) in bash? How does it compare to the =(<command>) in zsh? I ...
0
votes
3answers
43 views

Bash/Shell: Get the list of newest files by ctime in directory, sort and retrieve only 3 for each of them

I have following files in a directory: trunk_rev.94564.zip trunk_rev.94565.zip trunk_rev.94566.zip trunk_rev.94567.zip trunk_rev.94568.zip trunk_rev.94569.zip v15_rev.94560.zip v15_rev.94561.zip ...
0
votes
0answers
15 views

sudo-users Executing and Runnning Commands Recursively

I would like to give a specific user the ability to run and execute commands recursively for a given directory and his subdirectories but only specify the top level directory in the sudoers file. ...
0
votes
1answer
17 views

Script Shell Division Operation

Here is my script: #!/bin/bash nb_lines=30 expr 100 / $nb_lines ./test1.sh 3 1) How can i change this script to have '3.33333333' ? Variable 1 2) How can i change this script to have '4' (round ...
0
votes
0answers
109 views

How do i configure a Logitech G502 Spectrum under Linux?

I'm thinking about buying a Logitech G502 Spectrum (the G502 with RGB LEDs) but as I am running Linux (Speciified in Debian @ work, ubuntu @work and archlinux @home) I am woundering how to setup ...
1
vote
1answer
22 views

Find only unique named files recursively

I'm having a problem finding only unique named files over directories and subdirectories. Files must be unique by their name, not md5 sum or content. I've managed to get list of unique files, but ...
0
votes
0answers
13 views

record directory history from multiple terminals and sessions

I often want to open a previously cd'ed directory in another terminal or session. dirh from fish shell only lists the directory history for the current terminal. autojump doesn't record from all my ...
1
vote
1answer
67 views

How do I remove the current directory (“.”) from my PATH?

I recently updated OSX to El Capitan, and in the process of running through the steps needed to update my development environment, I discovered something rather disturbing: bash is behaving as if . is ...
0
votes
1answer
104 views

how to Boot to UEFI shell

I am trying to follow some instructions to update some firmware and my instructions are x64 UEFI environment: Boot to UEFI shell Run update.nsh My OS : ...
1
vote
1answer
64 views

Unable to login as root or as user because zsh is missing

I installed zsh on my raspberry pi and for various reasons including the fact that the shell completely slowed down, I decided to remove it. I uninstall the package, changed the shell back to /bin/...
5
votes
1answer
82 views

“sudo screen” vs. “screen -> sudo”

When I want to drop a root shell into screen, I usually do sudo screen. A friend of mine first launches screen, then drops a root shell in the screen session. What is the better way of both from a ...
0
votes
1answer
14 views

Script Shell Extract String In the middle

#! /bin/sh lineversion ="/tmp/g-9.n.gggg1000.fr-worker1.V.2.tar.bz2" My question: how can i extract g-9.n.gggg1000.fr from $lineversion in another variable
1
vote
2answers
62 views

Ctrl-enter for fish shell

I had tried to create some accept completion and execute right away combination in fish on pressing Ctrl+Enter. function fish_user_key_bindings bind \c\n accept-autosuggestion execute end ...
1
vote
2answers
16 views

If Statement not evaluating as expected. Am I setting up my variables incorrectly?

I am trying to create a command that will allow me to check websites for specific words. I used \ at the end of the line to wrap it to the next, (not sure if I used those correctly here) these ...
0
votes
0answers
52 views

.hushlogin but for all folders in iTerm2 / oh-my-zsh

I updated to iTerm v3 beta, and now when I open a new tab with the same location of the previous tab, it shows the Last login MOTD if it's any folder other than ~/. I've read quite a bit about doing ...
0
votes
0answers
13 views

Changing Colors of Directories in z/OS when using ls

Is it possible to have directories show up in different colors versus regular files when doing ls on z/os? I'm finding lots of suggestions for the many flavors of UNIX, but none seem to work on z/os. ...
1
vote
0answers
15 views

Starting Scripts Using SSH

Case 1: ./Myscript.sh param (on a first node) Another node: (In parallel i run the same script) ./Myscript.sh param (on a second node) Case2: From my host, using ssh: for i in $(seq $...
0
votes
0answers
27 views

Shell script using diff to compare the different files

I have five different files and all are in different directory, I want to check matching files and find out the unique files as well. I am not sure how should I handle this.
0
votes
2answers
221 views

How to POST file contents using cURL?

I want to do an HTTP POST of the contents (as a string) of a local file located at path/to/my-file.txt to a URL endpoint at http://example.com/. For example, I might want to do the following: ...
0
votes
0answers
27 views

How to fix Linux No Such device or address while trying to open /dev/sddlma1?

Using clonzilla I recently re imaged a HS21 blade. During boot I am receiving a "No such device or address white trying to open /dev/sddlma1" An error occurred the file system check Dropping you ...
0
votes
2answers
33 views

new column to a tab delimited file, with as predefined value

How can I add a new column to a tab delimited file, at the end of the file, containing the same values for each row. For example: infile.txt Name Age Address Sex X 12 adrs1 M Y 15 adrs2 ...
0
votes
1answer
28 views

OS-X download, “Add the following statements to your .profile file: ” EGSnrc download

I have nearly configured EGSnrc on my OS-X machine running el capitan The final step is the following.... The EGSnrc configuration for NAME is ALMOST complete ... EGSnrc requires various ...