?
Solved

Shell Script in Knoppix

Posted on 2006-05-03
2
Medium Priority
?
709 Views
Last Modified: 2012-06-21
I have Knoppix 4.0 in a CD and I am also new is writing shell scripts.  

I have created a file called 'Car' and here is my shell

#!/bin/bash
echo Select a country from the following list:
echo America, Italy, France, Germany
read country

case $country in
[Aa]merica )echo Ford;echo Perhaps;;
[Ii]taly )echo Ferrari; echo no;;
[Ff]rance )echo Peugeot; echo no way;;
[Gg]ermany )echo Porsche; echo yes;;

esac

How can I save this file to a floppy disk?  What is the command?  I would like to make this file executable.  Could someone tell me the command?
0
Comment
Question by:Higante
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 2000 total points
ID: 16602713
Hi Higante,

> How can I save this file to a floppy disk?  What is the command?  
I am not sure of there is a specific command in Knoppix, never used Knoppix, but common way of doing this is to mount the floppy using mount command and then save the file to the mounted filesystem
 mount /dev/fd0 /mnt/floppy
Then simply copy to /mnt/floppy file system

>I would like to make this file executable.  Could someone tell me the command?
chmod +x /path/to/file
This would give execute permissions to everyone
To give execute permissions only to the owner, use
chmod 0755 /path/to/file

Cheers!
Sunnycoder
0
 

Author Comment

by:Higante
ID: 16602800
Thanks for the quick response.  
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

864 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