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

Tramp: How can I disable password prompt each time a remote shell is opened?

Each time I run a shell on a remote computer using tramp it prompt me for a password. When mean shell it might be shell or a python process or an ESS process. How can I disable password prompt or ...
1
vote
1answer
218 views

Bash commands in Makefile

I want to use bash commands in Makefile along with MATLAB scripts. Currently when i put a simple bash command in Makefile and run that target, I get error /bin/bash: ./test1: No such file or ...
3
votes
1answer
468 views

Why does ‘tmux’ create new windows as login shells by default?

When you start a new session in tmux or create a new window inside a running session, its default behaviour is to run a shell (ex.: bash) as a login shell. I understand that a login shell is intended ...
1
vote
1answer
67 views

Shell aliases when launching programs from within a Desktop environment (Alt+F2) or window manager?

I'm quite confused about how X runs its programs. As I understand it, much of the environment for programs run by the desktop environment (Gnome/XFCE/i3) is setup (traditionally) in ...
2
votes
1answer
22 views

Killed shell by trying to change shell type which failed to install

I managed to kill all access to the shell by trying to install fish shell via brew and then set the default shell to fish via: chsh -s /usr/local/bin/fish Unfortunately fish doesn’t seem to exist ...
0
votes
0answers
27 views

How to launch a lua server?

I wanted to know how to launch a lua server. I found a game I'd like to play with friends, though we do not know how to start the server that is .lua. The game is here. Could you help us please?
1
vote
3answers
38 views

Script Shell: Delete a line from a file

Here is my file "test.txt": 172.16.68.4 172.16.68.3 Here is my script: #!/bin/sh ip="172.16.68.4" sed '/$ip/d' $1 Please, i'd like to delete a line from test file but it didn't work for me. ...
0
votes
1answer
73 views

yes command replacement unix shell scripting

Is there any command like yes command for Sun OS 5.8? I want to give to write a script which I need to press n continuously, which I want to automate. I tried with yes command but it is not there in ...
-1
votes
1answer
16 views

Command to browse online archives on CLI

Is there a shell command which lets us go through archive like http://archive.apache.org/dist/hadoop/hive/ through CLI ? Some command which lets us perform functions of atleast one of ls and cd, ...
1
vote
1answer
101 views

Command not working on shell but working on prompt

I am a newbie to Linux Shell Script. I want to change the IP address by Linux Shell Script and called by a PHP web application. I have finished my PHP web application and the shell script. Before ...
3
votes
3answers
654 views

How to execute a second condition if the first condition is true in Linux shell scripting

I have an if condition. If that condition is true then one script will be run and after that I need to check another condition. How can I do that using an if statement or something else? For ...
1
vote
2answers
2k views

Running the output of `ssh-agent` in fish; what does `setenv` do?

When I want to start (or restart) ssh-agent, it gives me a few commands that I should run by doing eval $(ssh-agent). Of course this fails for fish, since it gives syntax for bash or csh. The ...
1
vote
0answers
36 views

How to read contents of ATSAM3X8E chip on Arduino Due Board in Mac OS X

I have two Arduino Due boards with some programming that has since been lost. I need to back up the contents before replacing the program. I’ve been playing around with another Arduino Due before I ...
0
votes
2answers
193 views

Loop inside EOF - UNIX SCRIPTING

I am writing a script to automatic start up of an application whenever we found error in logs. so #/bin/bash if [ grep -c 'error' logs -eq 0 ] ;then exit else start <<EOF ## start is a ...
6
votes
1answer
159 views

Why does rsync read .bashrc and not .profile?

rsync is a non-interactive program that logs into other machines. It shouldn't need the init file for an interactive shell session, and it should absolutely need the init file for a login shell. Or so ...
-2
votes
1answer
65 views

using find and delete files/folder - with the exception of 1 folder - challenging

i want to use find and delete everything with the exception of one folder if found. e.g. [oracle@SJOAM test]$ ls -l total 4 -rw-r--r--. 1 oracle oinstall 0 Sep 2 02:05 a -rw-r--r--. 1 oracle ...
1
vote
2answers
52 views

“read” works as expected in ZSH but behaves differently when using any other shell

I’ve written a short while-do cycle but I found it working strange with different shells. That's it: find "`pwd`" -type d | while read -r D; do ls ${D}; done When I start it using zsh, all goes ...
1
vote
1answer
239 views

Bash script to create a folder structure

I'm trying to write a Bash script to automate a recurring task, namely the creation of a structure of folders, where some of them should be numbered (To be more specific, this is meant to archive some ...
1
vote
1answer
104 views

Upstart: What is the first tracked PID w/o expect, but with script AND exec?

I have some Upstart configs used to start some foreground and blocking processes to run in the background as some kind of "daemons", especially those processes do not fork in any case. What I want is ...
0
votes
0answers
20 views

Running SGE array job

I am working on SGE and I want to submit an array job for 10 files. For the time being to keep it simple I want to use only 2 commands in the script for each input files So let's say I have 10 input ...
1
vote
0answers
134 views

How to set output of terminal to external VGA display

I have laptop with broken screen and external monitor that i can connect to laptop via VGA port. Is there any way how to set output of shell(I have no GUI on installed debian) to VGA monitor? I can ...
0
votes
0answers
35 views

How can I get new messages in thunderbird via linux terminal?

I am trying to find a way of getting new messages from Mozilla Thunderbird without opening it.
1
vote
3answers
78 views

How to scp-and-ssh with specifying host twice?

I frequently do this kind of thing: scp somefile me@host:/some/path ssh me@host Typing out me@host twice can be irksome. We (or at least bash) can grab that last argument with !:$, but that ...
-2
votes
1answer
51 views

bash: Loop over lines of a file

Here is my script: #! /bin/sh for line in $(cat list); do echo "[$line]: Getting my workers list.."; var=$line-"worker1"; echo "$var" >> "hostlistworkers.txt" ...
-1
votes
2answers
71 views

Enter shell script output in a Xml file

<property> <name>mapred.tasktracker.map.tasks.maximum</name> <value>2</value> <description>The maximum number of map tasks that will be run simultaneously ...
-1
votes
2answers
98 views

formatting output in bash shell to remove special characters - linux

I am issuing the command below against a logfile grep "Oracle Audit" /var/adm/messages | awk '{print $6}' How do I format the below output Audit[9460]: Audit[10507]: Audit[10507]: Audit[10507]: ...
2
votes
1answer
117 views

Incorrect output of history command of ssh. How to read the timestamp info correctly

I set the HISTTIMEFORMAT variable to store the timestamp info .bash_history file. I am able to display the history properly if I use interactive shell. But, when I run history command to display ...
0
votes
3answers
201 views

/etc/shadow and /etc/passwd privilege - why is it writable

sghk1> id uid=0(root) gid=0(root) sghk1> ls -l /etc/shadow -r-------- 1 root sys 4045 Aug 24 15:52 /etc/shadow sghk1> ls -l /usr/bin/passwd -r-sr-sr-x 1 root sys ...
4
votes
4answers
1k views

Change default shell on MSYS2

I want to change MSYS2's default shell from bash to zsh. I've tried chsh - not available in MSYS2. Editing /etc/passwd does nothing. It seems to be ignored. I took a look at the batch scripts in ...
0
votes
0answers
21 views

Undo command Linux “rm” [duplicate]

Please, I have used rm * in a script shell, it deleted all my files? (a typo) Is there a solution to recover these files ?
2
votes
2answers
100 views

Run tcsh with arbitrary startup script

I want to create a new instance of tcsh and source an arbitrary script, all in one step. The problem is that when I use the -c option, the shell instance closes as soon as the script is complete. ...
1
vote
1answer
205 views

How do I list all installed packages from the command line in bash / osX

What is the -bash command to list all the packages installed locally on my machine? I am using osX. I tried the following so far: dpkg -l - doesn't work. apt --installed list - doesn't work. ...
3
votes
1answer
32 views

How to run overdue at jobs

Sometimes I have at jobs overdue after system-suspend that don't run after waking up. How can I tell atd to run them? I tried atd -s or atrun but I guess that isn't meant for this as it doesn't run ...
0
votes
2answers
100 views

FFmpeg : mp4 and multiple srt into mkv

I have a couple of srt subtitle tracks for an mp4 video. How do I make them into mkv using ffmpeg/avconv? I would like to use space efficiently. Performing conversion on Darwin v13. I will be ...
0
votes
1answer
60 views

Why awk printing wrong string into the output file?

I'm trying to read file with awk and write the output in a new file. Content file sample: DATE_Login|09:01:20.507|2015-08-13|TIME_Session|00:32:32|MX|w32 ...
0
votes
0answers
71 views

shell script works normally, but not as a vagrant provisioning script.

I am trying to have vagrant run a script from within the provisioning script. pip install --upgrade pip sudo pip install virtualenvwrapper source /usr/local/bin/virtualenvwrapper.sh mkvirtualenv -r ...
1
vote
0answers
21 views

Terminal reset troubles

According to the MinGW setup program, I have the bash shell installed. When I attempt to issue a reset, I get: sh: reset: command not found Bash responds to the reset command in every other ...
1
vote
1answer
29 views

Keyboard command in shell for skipping file during copy

Probably a stretch but is there a keyboard command that is accepted by cp from the shell (using bash/zsh) to skip a currently copying file for example if I am recursively copying a folder structure of ...
2
votes
1answer
119 views

Zsh shows debug information on startup

My zsh shell is showing some weird behaviour lately. Every time i start a new session these debug information are shown before my prompt: LC_CTYPE=en_GB.utf8 LESS=-R LOGNAME=username ...
2
votes
1answer
89 views

Standard utility to write stdin to a file with no stdout?

I have two cases where I want to create a file with its contents supplied on standard input: I need to use sudo to have the privileges to create a file. An application always invokes an ...
0
votes
1answer
24 views

tmux server being killed when shell closes

Tmux server and my tmux sessions are being killed at the end of my SSH sessions. SSH session: # timepoint 0 $ tmux # timepoint 1 # ^D [detached (from session 0)] # timepoint 2 $ tmux a # ...
0
votes
1answer
65 views

why `./file.py` was working but `bash file.py` not work?

Why ./file.py was working, but bash file.py not work? When i run bash file.py or . file.py or source file.py get error like this: file.py: line 4: syntax error near unexpected ..... But ./file.py ...
3
votes
1answer
57 views

Unix tool to print directory (recursively, with ASCII art)?

Is there a command-line utility that can be run in a directory and output something like this, a pretty-printed directory structure? myproject └─ src ├─ master.scss ├─ my-module.scss └─ ...
-1
votes
1answer
119 views

linux command to get quarter details

I need to paas current date to linux command which will give me output for quarter number I have two queries date +"%Yq$(expr $(expr $(date -d '-1 month' +%m) - 1) / 3 + 1)" result -> ...
0
votes
1answer
68 views

I have an SSH session. Now I want to run a script on the remote host that opens in a new window on the local host. Is this possible?

I'm on Machine A and am SSHing into a headless remote host Machine B. (Ubuntu 14.10 Server.) I have several scripts that I wish to run. However, they will occupy my session window. These scripts are ...
0
votes
1answer
24 views

bash: or (`-o`) operatorator in `[[` (double square bracket)

(This question probably has been asked before but is very difficult to search due to the symbols...) The bash manual did not make it clear whether [[ (double square bracket keyword <- SEO) ...
1
vote
1answer
63 views

A cron job to change file permisssion

when i run chmod 777 to change permission of a file manually it runs. but when i put it in a cron job, it never changes the permission. #!/bin/bash YESTERDAY=`TZ=aaa24 date +%Y-%m-%d` chmod 777 ...
0
votes
2answers
51 views

Why doesn't my IF ELSE work?

It's a simple script I wrote, nothing fancy at all @echo off echo 1 = stream1 source echo 2 = stream1 high echo 3 = stream1 medium echo 4 = stream1 low echo 5 = stream2 source echo 6 = stream2 high ...
0
votes
1answer
80 views

How to get stdout of a “lost” session

I don't well what's the name of the situation, I think yesterday I closed a session with a background ipython process, but I am still able to connect to it (the process is running a web server and I ...
0
votes
1answer
42 views

Delete first line from a file and Update

Here is the file i work on "list": g-8.xx.yyy.zzzz g-9.xx.yyy.zzzz g-10.xx.yyy.zzzz g-11.xx.yyy.zzzz g-12.xx.yyy.zzzz Here is the script i try to complete ( i'd like to get the first line and ...