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
3 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 ...
-3
votes
0answers
42 views

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

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 ...
1
vote
1answer
30 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
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 ...
1
vote
2answers
34 views

Pass all *.txt files to a Python script in parallel

I have a Python script that takes a .txt file and does something with it. I need a Linux shell command that will search for .txt files throughout the system and pass the .txt files to my Python ...
15
votes
3answers
6k views

How can I do Ctrl-Z and bg in one keypress to make process continue in background?

I follow this pattern of suspending the task and then letting it to continue too often with the Ctrl-Z bg sequence. I was wondering is there any way to compress that to single keypress? My shell is ...
11
votes
5answers
11k views

Linux command to return number of bits (32 or 64)?

What is a Linux command that I can run to programmatically return either 32 or 64 to indicate whether the processor is a 32 bit or 64 bit processor?
0
votes
0answers
17 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 ...
8
votes
10answers
56k views

How to shut down a computer having a particular IP address?

If we have a collection of Windows and Linux computers on a LAN, is it possible to shutdown a computer having a specific IP address, using the Linux shell? Assume that I do not have ssh or telnet ...
2
votes
1answer
41 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 ...
5
votes
2answers
4k views

UTF-8 locale portability (and ssh)

I spend a lot of my time sshed into various machines, all of which are different (some are embedded, some run Linux, some run BSD, &c.). On my own local machines, however, i use OS X, which of ...
-1
votes
0answers
12 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? ...
0
votes
2answers
27 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 ...
5
votes
3answers
370 views

Suppress execution trace for echo command?

I'm running shell scripts from Jenkins, which kicks off shell scripts with the shebang options #!/bin/sh -ex. According to Bash Shebang for dummies?, -x, "causes the shell to print an execution ...
6
votes
2answers
6k views

how to delete all characters after cursor in shell

I want to delete all characters after cursor in putty or shell. How can i achieve this? Every time I want to delete the complete line, I need to press delete key and that is something I don't want to ...
0
votes
1answer
23 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
0answers
11 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 ...
1
vote
1answer
45 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 ...
39
votes
4answers
19k views

How to: Unlimited Bash/shell history?

Is there a way to define an unlimited history in Bash ?
1
vote
0answers
11 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 ...
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/[: ...
2
votes
1answer
41 views

Special equal character with sed from shell

My environment: I am working with the command interpreter on Windows. I use an sh.exe that came with some proprietary tools I have installed. I do not know the details of that sh.exe but here is ...
-1
votes
1answer
34 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 ...
108
votes
5answers
40k views

What is the difference between shell, console, and terminal?

I'm confused with the terminology. What is the difference between shell, console, and terminal?
46
votes
3answers
24k views

scp between two remote hosts from my (third) pc

I have two remote hosts. host1-> 10.3.0.1 host2-> 10.3.0.2 Both run an ssh server. The ssh server listens on port 22 in host1 and on port 6969 in host2. Now, using my local machine, I need to copy ...
1
vote
3answers
600 views

Is it possible to grab and store the returned window id of a terminal opened through applescript or bash?

I have been working on this "dashboard" to help control my localhost server environment. It has been scripted in bin/bash for reference. I recently discovered I can use the bin command "osascript" to ...
0
votes
2answers
25 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 ...
6
votes
3answers
2k views

Difference between tmux and shell split options on iTerm2?

I currently switched to iTerm2 + VIM for my dev environment. I noticed that the last version of iTerm2 supports tmux and there were people using tmux to split the window into several sessions. I also ...
1
vote
0answers
15 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 ...
0
votes
1answer
26 views

How to save the result of a script into a text file? [closed]

I use the following command to grab the source of a front page, but I want to save it to a ".txt" file: osascript -e "tell application \"Safari\" to return the SOURCE of current tab of window 1" ...
0
votes
1answer
4k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
0
votes
1answer
68 views

how to use standard output from multiple commands as file arguments

I want to compare the output of 2 commands. For example: $ command1 arguments1 > tempfile1 $ command2 arguments2 > tempfile2 $ diff tempfile1 tempfile2 > savefile $ rm tempfile1 tempfile2 ...
6
votes
3answers
24k views

How to print new line character with echo?

I dump a string with hexdump like this 2031 3334 2e30 0a32 2032 3331 302e 000a. It is clear that 0x0a is new line character, however, when I try to echo this string out, I always got 1 430.2 2 13.0 -- ...
1
vote
2answers
35 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
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' > ...
2
votes
3answers
7k views

Script to Auto delete files older than a few minutes in ubuntu

is there a shell script out there that deletes all files in a folder that are older than x minutes?
1
vote
1answer
15 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
28 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. ...
5
votes
1answer
48 views

Execute same command for each non-interactive bash session

I need to implement some config - I need to execute some code, if someone on my system calls for bash command in any form (interactive, non-interactive and bash -c form). For example this is command I ...
7
votes
2answers
5k views

Shell SIGKILL Keybinding

How can I setup a keybinding to send a SIGKILL to the current foreground job? I already know that Ctrl+C is SIGINT and Ctrl+\ is SIGQUIT. I would like a more severe option. Is there anything ...
2
votes
3answers
2k views

What does $@ mean as a bash script function parameter

What does $@ mean as a bash script function parameter? Example: function foo() { echo "$@" 1>&2; }
1
vote
1answer
25 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 ...
11
votes
7answers
15k views

How can I sort all files by size in a directory?

How can I display the files in a unix directory sorted by their human readable size, going from largest to smallest? I tried du -h | sort -V -k 1 but it does not seem to work.
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: ...
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 ...