Questions tagged [shell]
A shell is software that lets users interact with the operating system, usually by typing at a command-line.
4,120 questions
3
votes
1
answer
201
views
How to run shell commands via stdin?
I was working with a command like this:
ssh another_host <<EOF
set -x
command_a
command_b
run_framework
command_c
...
EOF
The odd thing was that only commands up to and including run_framework ...
1
vote
2
answers
3k
views
64-bit alternative shell for Windows XP, Vista, or 7
I’m looking for a minimalistic 64-bit replacement shell for Windows XP, Vista, or 7. Any ideas?
35
votes
4
answers
12k
views
Why is my Bash history truncated to 500 lines on each login?
For some reason, I cannot get my system to keep my Bash history after a reboot. Here are the relevant sections of my ~/.bashrc file:
shopt -s histappend
PROMPT_COMMAND='history -a; updateWindowTitle'
...
21
votes
4
answers
8k
views
How to make Zsh not store failed command
Problem
I'm using oh-my-zsh and Antigen to manage my Zsh.
Sometimes I will accidentally enter a wrong/failed command into Zsh and it is very annoying when the zsh-autosuggestions plugin throws up ...
2
votes
2
answers
76
views
How can I use Awk to match multiple lines and then concatenate other fields?
How can I use Awk to match multiple lines and then concatenate other fields?
1 Gen 1 75
1 Gen 1:1 10
1 Gen 1:1 11
2 Exo 1:1-2 13
2 Exo 1:1-2 14
3 Num 1:1-4 ...
0
votes
2
answers
4k
views
Copy shell configuration from one machine to another?
I've got login to another server where shell configurations are not like I would want. For example I don't see my username and CWD on prompt, and when I press arrow key, instead of giving last entered ...
2
votes
2
answers
3k
views
How to disable MOTD from Debian 12?
I am looking to disable MOTD on my Debian 12 systems. I updated my sshd_config file to not display MOTD but it is still showing up. Is it possible it is coming from another module and how can I ...
5
votes
3
answers
1k
views
sh syntax to handle zero files matching a wildcard, as well as more?
I want to write a /bin/sh shell script which will handle any files matching a wildcard. It's easy to handle 1 or more matching files. However, I'm finding it awkward to handle the case of 0 matching ...
2
votes
1
answer
173
views
How to get a list of existing files from a list of files?
I have a list of files (builddir/foo.s builddir/foo.i builddir/foo.ii) that happens to come from brace expansion of builddir/foo.{s,i{,i}} . I would like to symlink them into the current directory ...
1
vote
2
answers
9k
views
/bin/sh: 1: Syntax error: Unterminated quoted string when using basename
code example:
my PWD = /aa/bb/cc/dd
dir= `dirname "$(PWD)"`
output = `basename "${dir}"`
dir variable outputs correctly: /aa/bb/cc
desired output variable: cc
error I'm getting: /bin/sh: 1: Syntax ...
15
votes
1
answer
35k
views
When creating a symbolic link, how do I troubleshoot 'too many levels of symbolic links'?
I'm trying to create a symbolic link on Ubuntu 10.04 (Lucid Lynx) it says:
me@laptop:~/PHPUnit$ ls
assertions.php LICENSE PHPUnit README.markdown
build.xml package.xml ...
1788
votes
10
answers
1.7m
views
How can I sort the output of 'ls' by last modified date?
How can I sort the output of ls by last modified date?
4
votes
2
answers
5k
views
Is it possible to have dropdown autocomplete select options in ZSH or Bash?
Is it possible to have dropdown autocomplete select options in the terminal with ZSH or Bash as shown in the image below? Here the regions(i.e. ap-northeast-1, ap-northeast-1 etc) are predefined
4
votes
1
answer
4k
views
Tab Auto-Completion in Mac OS X when using sftp in terminal
i have been getting very frustrated lately since the readline functionality has been removed from MacOSX and Tab Auto-Completion doesn't work anymore.
So i was wondering if anyone knew a good ...
5
votes
3
answers
4k
views
Windows Explorer: Customize view settings via batch or shell-extension?
In folders with shortcuts (and junctions) I oftenly like to have mid-sized icons, sorted names and grouping by type. Alas, Explorer oftenly forgets these settings once I made them manually.
The ...