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

Customize predefined entries in Windows Start Menu

I would like to add some custom entries to Windows XP / Vista / 7 Start Menu and place it between predefined options like: "Help and Support" and "Run" so that user cannot delete or move those ...
0
votes
1answer
12 views

/bin/bash -c stopping counting with date

/bin/bash -c not starting counting with date: /bin/bash -c "while true; do echo [`date +'%F%t%T%t%Z'`] Keep Alive; sleep 1; done" The output is: [2015-07-06 13:44:36 UTC] Keep Alive [2015-07-06 ...
0
votes
5answers
34 views

Extract filename from file using shell script

I have a text file which has the following line: /u/tux/abc/spool/frtbla_mcdetc_0000149099_20101126135009990_1.tif I want to extract frtbla_mcdetc_0000149099_20101126135009990_1.tif; the word after ...
1
vote
1answer
17 views

Custom command not working

In my Ubuntu I tried to create a custom command: I added a bash script named ns3 in /usr/bin #!/bin/bash cd ns3/ns3-allinone-3.19/ns-3.19 I made it executable chmod +x ns3 Still it doesn't ...
0
votes
0answers
5 views

linux translate-shell -play command not working

I am new to linux and just installed translate-shell on Ubunutu 14.04 distr. If I run a translation, for example 'trans -p hello', I get the following error: [Warning] No avaible audio player or ...
0
votes
2answers
35 views

Shell script to pass multiple arguments with options in command line

I have the script, I need to execute this script like this: ./create_endpoint.sh --controller-ip 10.20.20.1 --controller-name User1. But its executing like this: ./create_endpoint.sh 10.20.20.1 ...
-2
votes
0answers
22 views

How to get total records affected in database: A shell script

I have written a shell script to update the records on database server. The query.sql file contains variable number(almost 600 to 800)of insert queries. As I am running the script, it runs fine and ...
1
vote
3answers
40 views

difference between ${} and $() in shell script

$ echo $(date) Thu Jul 2 16:33:11 SGT 2015 $ echo ${date} $ name=foo $ echo $(name) ksh: name: not found $ echo ${name} foo Seems like ${variable} is the same as $variable. while $() is to ...
0
votes
1answer
19 views

What is .funcrc?

I have not been able to find any information on why this file exists or what should go inside it through the usual channels of investigation. This is why I am asking here in the hopes of eliciting an ...
0
votes
2answers
35 views

Accessing shell variables inside 'sudo' block : export doesn't work

I am writing a script to fix a missing 'F' letter in a mail log file. The mail log file is continuously updating. I am getting a file name, after that I am doing 'sudo su' to get superuser access. ...
0
votes
0answers
13 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
18 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
27 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
14 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
20 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
21 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
14 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
24 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 ...
1
vote
0answers
19 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
29 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
20 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
11 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
25 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
27 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
20 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
81 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
18 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
19 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
36 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
63 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
35 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
68 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
45 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
31 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
6 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
45 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
29 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
62 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
196 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
31 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
117 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
75 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? ...