Shell Script in Knoppix

Posted on 2006-05-03
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

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;;


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?
Question by:Higante
    LVL 45

    Accepted Solution

    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


    Author Comment

    Thanks for the quick response.  

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
    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…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    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.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now