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

Windows desktop shortcuts with keyboard shortcut stopped working

I have a few shortcuts (.lnk) on the desktop, with in the properties dialog "Shorcut key:" values of "CTRL + ALT +" and a letter. For example "CTRL + ALT + N" to open a new e-mail. This worked great ...
1
vote
1answer
16 views

How do I get fish shell prompt to show the hostname?

I'm attempting to make my Fish prompt look like the old Gentoo shell did. user@hostname ~ % where the user@hostname is green, and the $PWD and symbol were blue. Right now it only shows: user@ ~ %, ...
0
votes
1answer
24 views

Result of | grep in a variable

Here is my script: var= $( $line | grep -Po '.*(?=.fr)' ) echo $var I have an error and it displays nothing: command not found Have you idea please ? Thank you so much for help. Best ...
0
votes
0answers
10 views

SELinux issue with php_shell_exec

I have a php site on CentOS7 that needs to use some shell scripts using php_shell_exec. But the scripts do not run due to SELinux (that I require). None of the scripts use sudo, I understand that ...
1
vote
1answer
13 views

Construct command for bash exec

I have a shell script that runs exec to replace itself with another command. The other command takes some optional arguments. exec mycommand $ARG1 $ARG2 $ARG3 Any of these arguments could be ...
1
vote
2answers
18 views

cannot set uid with mount

mount -o uid=1000 /dev/sdb1 /mnt mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error In some cases useful info is found in syslog - ...
0
votes
0answers
20 views

Shell Script “cannot execute binary file”

I'm new to putty. However while running a shell script I got this error: "cannot execute binary file" I believed the syntax is : sh Name_of_shellScript.sh parameters How can I resolve this?
0
votes
0answers
10 views

Script to open multiple gnome-terminal tabs, each running their own command?

I am currently developing a plugin for Minecraft. My setup consists of five terminal tabs, which I have to recreate every time I log in. I need to cd to the particular directory, then run the ...
2
votes
1answer
23 views

Why does ZSH local variable assignment fail?

I was reading this question and answer: zsh - variable assignment isn't working. The post explains how to fix it, but not why. Why does the local variable assignment fail in that case ? There ...
-3
votes
0answers
43 views

What is a 'Shell' in the context of OS? [closed]

Is a shell always a command-line interface? In Linux, which one is the shell: a. Login prompt, b. Command-line-interface after login, c. Terminal (that opens up in the GUI and allows to enter ...
1
vote
0answers
14 views

Sourcing .bashrc does not enable use of nvm

I'm trying to set up a shell script to run in the context of a user account after the creation of a virtual machine using vagrant; I am a windows user so I've limited exposure to bash scripting. I'm ...
2
votes
0answers
27 views

Prevent ARP spoofing in AP, “wl deauthenticate” command

I am in a situation where I cannot do MAC filtering in an AP and I need to block a user that is ARP spoofing the network. I am trying to use the command wl deauthenticate to kick the client. And I ...
0
votes
1answer
16 views

How to make a Windows desktop shortcut (with shortcut key) to open a Chrome pop-up window

If you create a desktop shortcut, and set a shortcut key in its properties, you can use that shortcut key in any application. How can you make such a shortcut so it opens a Chrome pop-up window, not ...
1
vote
1answer
8 views

Monitor SSH login's via slack but hangs on SCP

I'm playing around with some slack integration so that every SSH attempt gets sent to a slack channel The script below works perfectly for SSH attempts but the issue is that when I preform a SCP to ...
1
vote
1answer
24 views

Hit enter automatically when running apt-get install <package> prompts a dialog boxes

I'm running command apt-get install -y <package>. It overcomes confirmation like Do you want to continue? [Y/n] But in the process of updating, I got a popup which asks to hit enter in ...
1
vote
1answer
26 views

FFmpeg performs every second task

Why does ffmpeg perform every second task that it is ordered to? for i in *.MTS; do echo ffmpeg -i \"$i\" -c:a copy -c:v copy \"$i\" | sed 's/MTS/mp4/2' done | sh For example. if I have 9 MTS ...
0
votes
1answer
18 views

How do I make an alias for a Unix command that includes both single and double quotes?

I defined the following command: top -b n 2 -d 0.01 | grep 'Cpu' | tail -n 1 | awk '{print "cpu=" 100.0-$8 "%"}' which returns me the CPU usage in the form cpu=nn% I now want to define the alias ...
-1
votes
0answers
18 views

conEmu 3x3 bash

I want to run a 3x3 bash setup. Since this needed some tweaking I just wanted to share the answer here. Create a new task and add Bash::CygWin 3x3 bash to task name. Then paste the following in the ...
0
votes
3answers
80 views

Does “DOS” have a shell?

I have been reading the posts I found about shell , terminal , bash but I get more and more confused about these terms. Does the operating system DOS have a shell, like the bash in linux? Is this ...
0
votes
0answers
16 views

Stopping a process when a given file is accessed

I have a complex script that accesses/creates lots of files, and I'm trying to track down exactly when it creates a file with a given name. What I want is to be able to stop (e.g. as if using Ctrl+Z, ...
0
votes
1answer
16 views

git rebase --interactive throws an error

I'm relatively new to git. Could anyone, please, help running git rebase --interactive properly? It throws an error when I try to execute it. Note: I don't want to uninstall Xcode unless it's ...
0
votes
1answer
17 views

Escape-backspace behavior in fish shell like in other shells

I recently started using the fish shell for some things and generally like it. However I've run across one situation that would be great if there were a workaround. Say I typed a command like this: ...
1
vote
0answers
35 views

How do I start the taskbar after changing the “shell” registry key that runs at login

So, I have made a version of windows that looks like it isn't running windows (no logos or common windows tropes), so that it looks like it is only the software I choose that is running, sort of like ...
2
votes
1answer
55 views

Append text to first occurrence of a pattern using sed

Say there is a text file as below: Hello world types="" Mario types="Game" What I want to do is find the first occurrence of type="" and append with word "program". I need output as: Hello world ...
2
votes
3answers
44 views

Extract version string from filename

We have a list of filenames in file a.txt with their version string embedded in them. Eg: gson-2.1 xmlParserAPIs-2.4.0 acrobat-1.1 orai18n-mapping-12.1.0.2 jdbc-se2.0 eclipse-core-runtime-20070801 ...
1
vote
1answer
32 views

Disable audio output of a program

To disable text output we use > dev/null, for example, make > /dev/null But how to similarly disable audio output? For example, skype A>&1 /dev/null or whatever. EDIT: If it's ...
3
votes
1answer
34 views

Can't run default shell

What to do if I uninstalled my default shell (/opt/local/bin/bash)? I can't open terminal under my account unless my default shell is valid or at least exists. Are there any elegant ways to fix it? ...
0
votes
0answers
52 views

"bin/sh: can't access tty; job control turned off” error while installing

I am installing CernVM Software appliance in VirtualBox in Ubuntu. After I start the virtual machine, it starts to install but in the midway gives the following error bin/sh: can't access tty; job ...
2
votes
0answers
43 views

OSX - Custom lockscreen incorrect password script

As you probably know, in Mac OS X you can enable a lock screen when waking from sleep, where the user enters their password. I am looking for a way of running an Automator.app workflow when an ...
1
vote
1answer
29 views

Why can't I use my newly created user with chown?

So I am attempting to create a new user and group, and then change ownership of a directory to that new user/group. However, when I do, chown comes back with an "illegal user name" message. Here's a ...
1
vote
0answers
4 views

Including a fallback in default shell

I have an account on a network, and my shell is set to zsh, but when I log onto a computer that doesn't have zsh installed on it, a terminal I launch tries to run zsh and fails, so I get an empty ...
0
votes
0answers
39 views

How do I undo this terminal command?

The following was supposed to stop my f8 key from automatically opening my itunes on my Mac. "#!/usr/bin/env python import sys, os, subprocess launch = True blocker = "" apps = ["Spotify", ...
1
vote
1answer
42 views

How to run elevated shell from within console2 (Windows 8.1)? Possible?

I come from Linux, and for days I have been pulling my hair out trying to run an elevated shell (powershell, ipython interpreter, and bash) from within Console2. However, it always pops open a new ...
0
votes
1answer
28 views

Fish Shell STDERR not outputted by default

I am using the fish shell, which until this moment had been a perfect replacement of the good old bash, but I came across the following problem. fish does not forward STDERR to STDOUT. Of course if I ...
0
votes
1answer
61 views

Mac OSX restart from command line and close all windows

I want to use command line to restart my mac OSX, I'm using: sudo shutdown -r now But i want to restart without the reopen windows option, I've looked at the documentation here but with no luck, ...
2
votes
1answer
24 views

Search for files created at specific time in folder OS X

I have a folder with 2000+ image files in it from a time lapse camera. I want to find/select all the images that were taken at the time 10:00 and 15:00. The find function has a "date created" but I ...
2
votes
2answers
188 views

How to check if a file exists after a specific interval of time

I want to check if a directory contains a file (for example sample.txt). If it doesn't contain that file in 5 hrs then I would need to perform some action. How can I do this in a script? I tried ...
1
vote
2answers
30 views

How to set a time length of ssh and redirect the error message

I have a hostlist and there are several hosts. I want to use ssh to connect to them. I want to see whether the host is available or not by the time length of ssh takes. If it take long than 5s (which ...
1
vote
0answers
17 views

How does OS X's Terminal pass the new tab's dir to login or bash?

In OS X, you can add a shell to /etc/shells and set it as a user's default shell, such that when they open the terminal they are presented with that shell. In addition, When you have the option to ...
0
votes
1answer
106 views

Android ADB Shell sendevent Not Working

I want to simulate pressing the power button on a rooted Samsung Galaxy Tab 2 GT-P5100 running Android 4.0.4 using the ADB shell. To do this I changed the relevant permissions using: adb shell su ...
1
vote
1answer
69 views

What triggers notifications of the form “Bell in session Shell” in KDE?

I'm running KDE on Debian Testing. From time to time, programs running in a terminal (Konsole) trigger system notifications of the form "Bell in session Shell". What triggers these notifications? ...
0
votes
0answers
30 views

Git Bash on Windows 8 open to specific directory except when using Git Bash Here context menu

When I right click and choose Git Bash here it works as expected and the shell launches in the correct window. When clicking just the icon, despite changing the Start In settings, the directory is ...
0
votes
1answer
17 views

Where does device mode and state output come from, and how do I disable it?

Whenever I change my wlan broadcasting details with hostapd I get some output like this: [ 6706.929857 ] device wlan0 entered promiscuous mode [ 6707.986991 ] br0: port 2(wlan0) entered forwarding ...
1
vote
3answers
192 views

Edit xml file using shell script / command

I need to do this using unix script or command There is a xml file in /home/user/app/xmlfiles like <book> <fiction type='a'> <author type=''></author> ...
0
votes
1answer
36 views

What is CMPRS in this top command output?

Processes: 264 total, 2 running, 9 stuck, 253 sleeping, 1229 threads 2015/04/13 17:17:48 Load Avg: 1.00, 1.22, 1.24 CPU usage: 6.36% user, 21.81% sys, 71.81% idle SharedLibs: 14M resident, 16M data, ...
1
vote
1answer
19 views

Make shell script rerun command on certain user input

I'm writing a shell script that randomizes my hostname but prints the random hostname and prompts me if I want to use this hostname for example NEXTHOST=$(sed `perl -e "print int rand(99999)"`"q;d" ...
1
vote
2answers
66 views

Is there a folder-specific .bashrc or .bash_profile?

Is it possible to have a bash script (like a .bashrc or .bash_profile, basically) that is executed only upon cd’ing into a specific folder?
0
votes
1answer
59 views

Looping through files and collecting data

Ok, I have a problem that I think you guys can help with. I have 24 folders. Labeled Angle1, Angle2, ... , Angle24 Each folder has a file name output.txt In each file named output.txt, I want to ...
0
votes
1answer
34 views

Controlling tty / terminal output from other session / shell

We are told that a tty can control at most one session and furthermore that ttys can be controlled not to allow background process groups within its controlled session to write or read from it, the ...
0
votes
1answer
80 views

How to clear screen on Python 3.4.2 shell?

I am trying to clear the screen on python 3.4.2 shell, I used clear screen, clear(), cls, clrscr etc. But no one is working, Please let me know the command to clear the screen.