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 Bourne Shell.
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.
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.
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.
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
.
My wife and I have been big fans of the Bourne movies since The Bourne Identity first came out. I wasn't real exited about The Bourne Legacy, since Matt Damon wasn't in it. But last night we finally went and saw it.
I thought it was a pretty awesome movie, but I like the original ones better. But after seeing that, I'm not opposed to watching more with Aaron Cross.
That didn't do it. Unplayable on tablet after opening with VLC.
I'd like to be able to print the current line number in a shell script. I know about the $LINENO variable in Bash shells, but it doesn't seem to exist in Bourne shells. Is there any other variable or way I can get the line number?
Thanks