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
1answer
21 views

Using shell (bash) to determine key for value from file

I am scripting some application deployment and deploy promotion processes using bash (shell). These scripts are being written as a failsafe in case our CI platform ever fails again (as it has ...
1
vote
1answer
28 views

Changing sh color in .bashrc

I'm trying to change the color of my shell which I connect to using Putty. When I type this export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h:\w\$ ' I get exactly what I want. ...
2
votes
1answer
7 views

Script SSH Interactive Console that needs escaped chars

I would like to modify my existing SSH connection via a shell script. So if I run an existing script remotely I would like it to open a new port to be tunnelled. Interactively I can do this via: ...
0
votes
1answer
36 views

Batch for execute Putty, log on Server and run commands with shell script or txt [duplicate]

I need help for this process. I have a batch file to run Putty and log with ssh an server and will execute commands from file "commands.txt". C:\Programme\PuTTy\putty.exe -ssh user@server -pw 123456 ...
-2
votes
0answers
17 views

I think I broke gnome-terminal

After toying around with custom startup commands in GNOME terminal, I came up with the fabulous idea to make it start with su. I didn't realize the 'close after the command executes' option was ...
1
vote
1answer
25 views

files dissapear when I run mv command

I use the below command to move files: mv *.gz directoryname but directory name has spell mistake and the file with directory name has been generated with unknown format. And I lost my file. How ...
-3
votes
0answers
47 views

How Can I Find All The Script Files on My PC? [closed]

I would like to be able to search for all script files in order to bring what info is buried in various text files out so that relationships in the mind can form quickly as to: (a) How it is ...
0
votes
0answers
19 views

Duration time between cycles in a log file

My apologies if this is too basic, but I have a log with this kind of information: Mai 5 12:34:00 xoengine XO[1287]: [Xo|xoengineMain.cpp:122|0xb88ec60] starting xoengine 4.0.1.2 (x86) from ...
-1
votes
0answers
14 views

how do you run a terminal application in the background?

I am currently trying sleep 45 osascript -e "set Volume 7" say -v Whisper "hello" in a text edit file but when i run it it pops up with a terminal window. How would i hide or disable this window? ...
2
votes
1answer
65 views

Execute commands using sudo in remote server after logging into PuTTY through batch file

I need to login into remote server daily and perform same set of tasks. I am using Windows platform and the remote server is Unix. I use PuTTY to login to remote server. To reduce the manual work, I ...
1
vote
1answer
31 views

How to change shell to custom shell?

So, I have made a little shell script in PHP with some basics functions (ls, cat, etc..) and I'd like to use it as my default shell. But since I don't want to do a mistake, I have some questions: If ...
0
votes
2answers
29 views

How to pass parameter in linux command at the end of the line

I would like to pass a parameter at the end of the line while I am giving a command in terminal. So I would like something like the example below find /path/to/directory -type f -exec grep -irl ...
0
votes
0answers
14 views

Vagrant shell provisioner does not respond

I am provisioning a VM through shell script in AWS using vagrant-aws plugin. VM gets launched and the shell script gets executed but I don't see any update on the shell prompt. It used to get updated ...
0
votes
1answer
24 views

Cannot execute ssh-ed osascript properly inside of shell script

I have created a ip-down script in my etc/ppp/ directory. Essentially I am trying to kill certain programs/servers when the VPN disconnects, then display a notification on another computer via ssh. I ...
0
votes
1answer
47 views

Can I install anything on this limited system?

My modem has a telnet port and when I login to that port I get a root shell in device. The commands are very limited but there is empty space in device. Can I install something like nmap to this ...
0
votes
1answer
15 views

Why doesn't cronjob execute feh command

I build a cronjob to download a new picture from a source every ten minutes and set it as wallpaper using feh. The file is downloaded but the wallpaper doesn't change. Where is the problem? crontab -e ...
-1
votes
1answer
36 views

How do you display the Settings window in Windows 10 when Explorer is not the Shell?

Using a Windows Shell replacement to Explorer in Windows 7 has worked well. Moving our Shell to Windows 10 is also working, but with a few unwanted side effects, including the fact that I cannot ...
0
votes
1answer
42 views

How can I tell bash top stop echoing text whenever I press any key?

I'm writing a custom startup command for gnome-terminal, and my intention is to display a welcome message every time I launch it. The message displays correctly, I coded it in order to make the ...
1
vote
2answers
30 views

Equivalent of `$@` for windows shell

I use batch files to create wrappers around some commands which need extra argument to work. For example, I have a file pip.cmd which adds a custom proxy argument to all pip calls: pip.exe ...
-1
votes
3answers
18 views

How to use the command “read” on a Shell script which reads its arguments from stdin

First of all, thank you for your help in advance and sorry in case this was answered before. I have not been able to find it. For helping to understand my question, I have written the following ...
0
votes
1answer
14 views

Import previous commands to edited command

I'm playing with zsh to change image modification time according to the 'Date/Time Original' exif attribute. For this I one command I do: PDATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ...
0
votes
2answers
27 views

bashrc alias ls not working

I'm trying to modify the ls command with an alias in my .bashrc file, and I'm getting some strange errors. .bashrc file export http_proxy="Some URL" export https_proxy=$http_proxy alias ls='ls ...
1
vote
0answers
16 views

Run shell and check port of specific postgresql version in ubuntu

Several versions of postgresql (9.3, 9.4 and 9.5) on a server with different ports and I want to start the shell of a specific one. If I run the shell: psql It returns: psql (9.5.0, server 9.3.10) ...
0
votes
0answers
7 views

Activate tablet Volume buttons when when explorer.exe not running

we are developing a Win 8.1 tablet desktop application in LabView, running in a Kiosk-like mode. I know Windows 8.1 offers the Kiosk mode for this, but only for Windows store apps. I changed Shell ...
1
vote
0answers
19 views

How to stop output from AT command in a shell line

I have this issue. I try to get output from AT command from my modem, using Linux. I get the output, but I don't know how to stop the output. The line is some like this: echo -e 'AT+CGMI' > ...
1
vote
2answers
36 views

What is the maximum value of a numeric bash shell variable?

I'm curious as to what happens when a numeric variable in bash is incremented up without purposely stopping it. How large can the number get? Will it overflow and become negative and just continue to ...
1
vote
1answer
17 views

How to sudo using another user's account password from a script?

I have a bash script running as user, a user account with no evaluated privileges. The machine has a second account admin which has sudo privileges. There is no root password set. The script knows ...
0
votes
1answer
29 views

No such file or directory .zshrc

Recently, I realized I haven't been able to run . .zshrc in my home directory. It gives me the error above. It's really strange and it's bugging me out since it's worked perfectly fine in the past. ...
1
vote
1answer
26 views

How to prevent “source” in a bash script from passing the script's arguments?

These questions address the functionality of source: What is the difference between executing a bash script and sourcing a bash script? What does 'source' do? but I'm confused as to why ...
0
votes
0answers
9 views

Fullscreen TMUX sessions selection

I've found TMUX's choose-tree command to be quite useful when navigating between sessions, but I dislike it only displaying inside of the current pane. I'd prefer it to overtake my entire screen. ...
3
votes
1answer
49 views

Why ctrl+c in console kills the background process

Could you explain why Ctrl+C in my bash shell affects the command that was run previously in background with: `./my_script.sh 1` & The command immediately finishes the execution with 130 code: ...
1
vote
1answer
14 views

Sort files by date and copy every other to new folder

I was wondering what would be the most concise way of sorting files by date and then copying every other to a new folder. My problem: I've got files renamed such that they are called file1 (101) ...
-1
votes
1answer
24 views

WinSCP/PuTTY: Cannot move file on server via sudo: Permission denied

I have uploaded a file to a remote Linux server. current directory is: /home/user/file.war Now i want to move the file into tomcat webapps folder and overwrite the existing version: The directory ...
0
votes
0answers
12 views

Which library implements the NO_PROXY variable?

Which library implements and passes to the network stack the NO_PROXY variable? Considering that is being read from a shell (ZSH, bash) or other programs. Is it just a variable that other programs ...
0
votes
0answers
5 views

Run PostgreSQL in Vagrant box with external shell provisioning [migrated]

I have been wanting to actually get a Vagrant box up and running on my PC for quite some time but I have failed to understand a lot of things but then I came across this guide: ...
0
votes
1answer
8 views

Bash Export Syntax Compatibility

I often see commands written with the following syntax and I am curious if this is done for compatibility reasons: Snippet from Default .bash_profile on CentOS # User specific environment and ...
0
votes
0answers
10 views

Checking if file exists to launch different programs

I use the following code to check for a file named loaded in the shared folder.This works when the file is placed in the local dir but it does not write the file to the shared folder. What I'm i doing ...
0
votes
2answers
120 views

Explorer.EXE Crash, Related to SHELL32.dll

I recently experienced another Windows Explorer crash. I have been experiencing Windows Explorer crashes sporadically for some time now. I was able to capture the event log. Context: Occurs commonly ...
0
votes
0answers
33 views

Make `last` display year in Terminal

Is there any way to get last (on Mac OS X 10.11.2) to display a full date (including year)? Right now it displays only day and time: user$ sudo last user | head -n3 user ttys000 ...
-1
votes
0answers
15 views

What to do for error: base64: command not found?

(cat << ! From: $FROM To: $TO Subject: $SUBJECT Date: $(date +"%a, %b %e %Y %T %z") Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="$boundary" This email has attached the file ...
0
votes
1answer
15 views

How to chain a group of commands in Fish like { … } Bash?

I'm aware of chain Fish commands via && or || but I'm willing to chain a set of commands Code env git clone --depth=1 https://github.com/rafaelrinaldi/theme-pure.git; or { printf "Error: ...
0
votes
1answer
34 views

How can I send email with attachment xls file using shell script as application/xls mimetype without making the received file becoming unreadable

#!/bin/bash ATTACH1=file.xls<br> SUBJECT="subj"<br> FROM=me@domain.com<br> TO=you@domain.com<br> CC=them@domain.com<br> MIME="Application/vnd.ms-excel" <br> ...
1
vote
1answer
73 views

The “shmmax” value is too large when installing Oracle 11g on RHEL7

I am trying to install Oracle Database 11g Release 2 on RHEL 7.2. Executing runfixup.sh, it outputs: # /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh Response file being used is ...
0
votes
0answers
19 views

does POSIX shell specify order of evaluation of arithmetic operands?

When executing a command such as echo $(( $(sleep 10; echo 0) + $(touch foobar.txt; echo 0) )) I observe (with current dash and bash shells) that the file foobar.txt does not appear instantaneously ...
1
vote
3answers
43 views

sed command in console works; but in shell script it throws error

I am trying to write a shell script to replace the SEARCH string by REPLACE string in all the files of the current directory (directory where my script remains). The condition I have is : the script ...
0
votes
0answers
8 views

How to save console output with timeout command

I want to be able to save console output of a php script when I am using timeout. The following command runs the script but does not create the xyz.out file timeout -k 10s 3h nohup php foobar.php ...
0
votes
0answers
24 views

Linux hangs after rebooting

I have a script that needs to run at boot time, I set it up using update-rc.d and now when I reboot the system with sudo reboot the system hangs during the boot process. But if I restart the system ...
1
vote
1answer
42 views

Terminal 'last' command doesn't display login history

The last command in Terminal (on Mac OS X 10.11.2) is supposed to display a list of login history. However, when I type it in, all I get is user$ last wtmp begins Mon Jan 11 13:17 user$ last user ...
0
votes
1answer
7 views

Unix shell: Multi-level sort in opposite directions

I have a directory full of plain text files that have tags on the first line, and I want to get a list of the tags and their frequency. I've extracted the tags and sorted them into a big list; let's ...
1
vote
1answer
41 views

how to “trace” a program such as shell?

I understand that dash is a "model" shell - it was written recently and well and it only implements what is required of POSIX shell. I looked at the dash source code to understand how "tracing" of a ...