Questions tagged [shell]

A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion. Not only does it allows the user to run programs from a text interface, but frequently offers basic programming features such as variables, substitution, output redirection, and wildcards.

A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion.

Not only does it allows the user to run programs from a text interface, but frequently offers basic programming features such as variables, substitution, output redirection, and wildcards.

The name was first used by Unix operating system for an interpreter used for command prompt, but currently the term shell refers to BASH(Bourne Again SHell) and other command prompt interpreters too.

1348 questions
15
votes
2 answers

Bash Prompt Below Output - Background Log Tail

I used to work for a company who had a customised shell for management of one of their products that was running on Linux and I'm looking to replicate a key feature of this shell. All the work was done by a background process and the output from the…
iamacarpet
  • 310
  • 2
  • 13
15
votes
4 answers

Is there a Windows CMD equivalent of Unix shell's exec?

Is there any equivalent in Windows to Unix Shell's "exec"? Basically, I need to avoid forking a new process, so that input/output pipes are preserved, as well as process id. Edit: So, here's my problem. I have a process A that starts a script, and…
Daniel C. Sobral
  • 5,713
  • 6
  • 34
  • 48
15
votes
5 answers

Changing the shell (using chsh) via the command line in a script

In a startup script that sets up a machine, I want to run chsh -s /bin/zsh However, this asks for the user's password. How do I pass in the password as a parameter? Or if I have sudo power, can I somehow bypass that step? Or alternatively, is there…
George41
14
votes
3 answers

How to pass command output as several arguments to another command

I have a command that produce a output like this: $./command1 word1 word2 word3 I want to pass this three words as arguments to another command like this: $ command2 word1 word2 word3 How to pass command1 output as three different arguments $1 $2…
Addy
  • 161
  • 1
  • 1
  • 5
14
votes
4 answers

Changing the mysql bind-address within a script

What would be the best way to change the mysql bind-address in the my.cnf from a shell script? Is there a way using a tool like mysqladmin or should I use sed or should I simply append it to the my.cnf and hope that the second entry overwrites the…
nonsenz
  • 371
  • 1
  • 2
  • 8
14
votes
1 answer

How to change default shell in FreeBSD?

The default shell in FreeBSD is sh and I really can't stand it: autocomplete is very limited, and rehash commands kill me. I feel like a one armed and one legged man... How can I change the shell globally to zsh or bash - for root and for all…
holms
  • 1,524
  • 7
  • 20
  • 37
14
votes
1 answer

How can I start a shell inside a jail on FreeBSD?

I have access to a a previously set up FreeBSD box with a number of jails on it. One of the jails is an SQL server, and does not have ssh enabled on it. How can I gain access to a shell on that jail from the host machine? (I have root rights on it.)
Redconnection
  • 297
  • 1
  • 3
  • 6
14
votes
7 answers

Has anyone found a (eg bash) shell terminal for Windows as good as the OS X one?

I am mostly using 'git-bash' which came with the Windows install of Git vcs. I think it is the same one that comes with Cygwin. It works fine technically but the UI sucks: have to right-click the title bar and go to Properties to change the window…
Anentropic
  • 949
  • 2
  • 11
  • 18
14
votes
3 answers

Store file in zip archive with different name (linux command shell)

In a linux command line, you zip a file by: zip -mqj archive.zip file.txt Now, I need to store 'file.txt' as 'file2.txt' in 'archive.zip', without renaming the file before zipping. When unzipped, the file should be called 'file2.txt'. How can I…
Trident Splash
  • 445
  • 1
  • 6
  • 13
14
votes
1 answer

OS X Terminal lines don't go into scrollback

I have a problem that crops up when using Mac OS X's Terminal (TERM=xterm): sometimes it gets itself into a state where lines that scroll off the top are not added to the scrollback buffer. I'm not using screen or similar; this is a plain bash shell…
Steve Madsen
  • 476
  • 4
  • 13
13
votes
4 answers

How do I start a second shell when in single user mode?

This may sound like a contradiction in terms, but I've recently needed to use single user mode (aka maintenance mode) for some time (days!) while trying rebuild a broken RAID array. While doing this, I've found myself wanting to use a second shell…
StarNamer
  • 431
  • 1
  • 5
  • 15
13
votes
6 answers

Log commands executed over SSH

I would like to log all commands executed over SSH. Say, ssh something@server.com COMMAND I want to log "COMMAND" on server.com I did search extensively but could not find anything. There is one more similar question but I don't think there is a…
Prashanth
  • 261
  • 1
  • 2
  • 8
13
votes
4 answers

Is BitTorrent good for copy files between servers in the workplace?

I have 1 source server that contains about 30GB of files that I want to copy to 7 other servers. I currently SCP the files over to the first four servers and when that transfer is complete SCP to the last 3 servers. Would using BitTorrent be faster…
Edward
  • 449
  • 3
  • 12
13
votes
5 answers

Bash: Quotes getting stripped when a command is passed as argument to a function

I am trying to implement a dry run kind of mechanism for my script and facing the issue of quotes getting stripped off when a command is passed as an argument to a function and resulting in unexpected behavior. dry_run () { echo "$@" #printf…
Shoaibi
  • 809
  • 1
  • 10
  • 28
13
votes
4 answers

How can one set a terminal's title with the 'tput' command?

I discovered through this answer that I've been setting terminal colours in my prompt in a naive way for years. I've now modified my .bashrc to use 'tput' commands to colourise various elements of my prompt. The one remaining escape code I have is…
Murali Suriar
  • 10,296
  • 8
  • 41
  • 62