Sponsored Content
Top Forums Shell Programming and Scripting embarrassing question: is sh = bash ? Post 302389304 by aneuryzma on Sunday 24th of January 2010 05:18:51 AM
Old 01-24-2010
embarrassing question: is sh = bash ?

I would like to know the version of my shell. I usually type "sh scriptName".

I googled for it and they usually say bash --version.
But is the same shell ? Can I have installed multiple shells ?

thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash question

Hi Guys, I found this script for monitoring the status of a services: for i in syslogd cron; do if && ; then printf "%-8s" "$i";printf " is alive=A\n" else printf "%-8s" "$i";printf " is not alive\n" fi The script is working fine except if either syslogd or cron will have a defunct... (3 Replies)
Discussion started by: itik
3 Replies

2. Shell Programming and Scripting

BASH script question

Hi, I want to create a script that gets a filename as an argument. The script should generate a listing in long list format of the current directory, sorted by file size. This list must be written to a new file by the filename given on the command line. Can someone help me with this? ... (6 Replies)
Discussion started by: I-1
6 Replies

3. Shell Programming and Scripting

bash script question

Can anybody be kind to explaing me what the lines below mean ? eval line=$line export $line ] || echo $line (2 Replies)
Discussion started by: jville
2 Replies

4. UNIX for Dummies Questions & Answers

BASH Pipe question

Hi all, I'm new to shell scripting, but enjoying myself! :cool: I'm trying to execute the following statement: alias evol="ps -AH | grep evol | cut -d' ' -f2 | kill -9" As you might guess. I'm wanting to use a single command 'evol' to kill all the processes containing the phrase 'evol' ... (4 Replies)
Discussion started by: mgrahamnz
4 Replies

5. Shell Programming and Scripting

Yet another bash arrays question

Hi all, I have a file that contains many lines, but only a few are of my interest, so I'm cutting it with grep + awk, and the result I get is for example line 0 line 1 line 2 line 3 line n Now I want to store each line in an array "cell" so I can use it later calling to ${array},... (2 Replies)
Discussion started by: TuxSax
2 Replies

6. Shell Programming and Scripting

Nested if question BASH

Just started learning bash ,and I am confused with sintaksis line 16: syntax error near unexpected token `else' thanks #!/bin/bash echo -n "Enter: " read num if(($(echo ${#num}) == 0 )) then echo No arguments passed.Try again elif rem=$(echo $num | tr -d ) ... (7 Replies)
Discussion started by: lio123
7 Replies

7. Shell Programming and Scripting

Quick Bash question.

Hi, I'm basically looking to see what this line of code does: . `dirname $0`/../config/config Thanks. (1 Reply)
Discussion started by: cabaiste
1 Replies

8. Red Hat

bash profile question

Hello, I'm new to RHEL and I was wondering where the prompt setup is from? This what it looks like: # I like this setup but I would like to add some color to it. I looked in the .profile, .bash_profile and .bashrc. I don't see anything in these files that give me the above prompt. So I looked... (2 Replies)
Discussion started by: bitlord
2 Replies

9. Programming

Question regarding Bash program

Hello All, I am trying to write a small bash script to make my life easier for an analysis. I have multiple folders and inside them are 10 output files with an extension .pdbqt What I am trying to do is to read the folder content and then make a PyMol (.pml) file to load the molecules and then... (11 Replies)
Discussion started by: biochemist
11 Replies

10. Shell Programming and Scripting

Bash Looking into files question

I have a bunch of files that are messages in my directory. Each message has a date located in the file. How can I look into each file and find the date? Thank you for any help (7 Replies)
Discussion started by: totoro125
7 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a file name containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 01:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy