Solved

How to run Bourne shell script on Unix.

Posted on 1997-10-01
2
615 Views
Last Modified: 2010-04-21
I wrote a simple Bourne shell script to test, but I don't know how to run it on Unix system.  Thanks for help. Mitsuru

#!  /bin/sh
#  SHOWINFO: Bourne shell acript to display an information file

#  If the information file exists, display its contents.
#  Otherwise, if the files does not exist, but if an older version exists, display the older version.  
#  If neither file exists, display an error message
     if   [-f  info]
     then
          echo "This information file has been found.";
          more info
     elif   [-f  info.old]
     then
          echo "Only the old information file was found.";
          more info.old
     else
          echo "The information file was not found."
     fi

0
Comment
Question by:mkido
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2007168
 sh script.sh
or
  chmod a+x ./script.sh
  ./script.sh
0
 
LVL 1

Accepted Solution

by:
weinerk earned 50 total points
ID: 2007169
recomendation from ozo will work

sh script.sh

or

chmod a+x ./script.sh
./script.sh
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best way to handle awk return value 6 79
What are recommended OS for exim mail server? 10 130
Sed question 2 139
Solaris acount issues 44 74
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question