Hey everybody, I've been searching google and these forums and have found some solutions to the issues I've been having today within the OLD Bourne Shell.
Before we get ahead of ourselves, it would probably be a good idea to go over some BASH basics.Let's start at the beginning, OK? The Bourne Shell was born at AT&T's Bell Laboratories a while back. It was birthed by Steve Bourne, hence the name. The Bourne Again Shell (bash) is a direct descendent of the Bourne Shell (sh). It's very similar to the critter that Mr.
From the book Advanced Programming in the Unix environment:
Linux uses the Bourne-again shell for its default shell.
The command line is a powerful way to interact with a Linux computer. Instead of using the mouse, you just type commands into the shell. (The shell is a blank window where you type in your commands.) So for example, instead of clicking on your file browser, you simply type ls [enter] to display the contents of your working directory.
I have just started learning the fundamentals of Unix and wondering why there are so many shells in a unix like system .
How can I find out whether a script is written in bash or sh?
The first line of the script is not helpful here, since on Linux, bash scripts have this line:
#!bin/sh
Actually, there are many distribution where bin/sh is bash (maybe bin/sh is a link to bin/bash in those distributions), and not Bourne Shell.
Hi I need help to find if a sentence contains a word in Bourne Shell (sh), with bash I would do something like my example.
#!/bin/bash
INPUT='Lorem ipsum dolor sit amet.'
if [[ "$INPUT" == *dolor* ]]
then
echo "So true"
else
echo "Not true"
fi
But this does not work with sh and I can't use bash.
//Fredrik
According to wikipedia, the Bourne shell was introduced in 1977 and C shell in 1978, but unix itself dates back to 1969.
If you were using a unix system before 1977, what shell would you have been using?
My /etc/profile code is:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
.