Short Bash Question

Discussion in 'General Apple Chat' started by nambrot, Jun 6, 2008.

  1. nambrot

    nambrot New Member

    Joined:
    Nov 18, 2007
    Messages:
    142
    Likes Received:
    1
    HI
    i have this shell script is it okay?
    i want to make 2 User inputs, one is the name and one is the sourcefile
    Is it okay?:

    MAC.sh

    #! /bin/bash
    echo -n "Enter city Name: "
    read -e name

    echo -n "Enter Source FileName: "
    read -e sourcefile
    echo "Extrating Streets"
    java -jar saxon.jar -o temp1 $sourcefile xslt1.xsl
    echo "Deleting Doubles"
    java -jar saxon.jar -o temp2 temp1 xslt2.xsl
    java -jar saxon.jar -o $name temp2 xslt3.xsl
    rm temp1
    rm temp2
    echo "DONE."

Share This Page