Thanks....that example got me pointed in the right direction.....
Thanks to Michael as well that site looks to be a very good resource

Dan Lansing

-----Original Message-----
From: Troy.A Johnson [mailto:troy.johnson at health.state.mn.us] 
Sent: Thursday, August 07, 2003 12:03 PM
To: tclug-list at mn-linux.org
Subject: RE: [TCLUG] scripting

Dan,

I like examples, so:

>>>>>START>>>>>
#!/bin/bash
echo -n "Enter a filename: "
read file0
file1=${file0}1
if [ -f $file0 ]; then
    if [ -r $file0 ]; then
        if [ ! -f $file1 ]; then
            mv $file0 $file1
        else
            echo "${file1} exists."
            exit 1
        fi
    else
        echo "${file0} is not readable."
        exit 1
    fi
else
    echo "${file0} does not exist."
    exit 1
fi
exit 0
>>>>>>END>>>>>>

That said, I like Perl and would use it instead.

Good luck,

Troy

>>> Dan.Lansing at andersencorp.com 08/07/03 11:35AM >>>
Sorry....i want to use bash scripting for this....should have had that in
original message if it is even relevant
-----Original Message-----
From: Lansing, Dan 
Sent: Thursday, August 07, 2003 11:34 AM
To: tclug-list at mn-linux.org 
Subject: [TCLUG] scripting
I am very new to scripting....i want to write a script that asks me to
enter a variable and the plugs that into a command
For example I run test.sh
And it asks me for a file name
I enter 'file' and it renames 'file' to 'file1'
How can I do this?
Anyone know of any good sites to get scripting tutorials?


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list