One more thing, you have the third line append the date before running through your if statements., might want to delete that line.
Jeremiah E. Bess Network Ninja, Penguin Geek, Father of four On Sat, May 30, 2009 at 15:32, Jeremiah Bess <[email protected]>wrote: > You need a space between the [ and -f and also on the -w. > > Jeremiah E. Bess > Network Ninja, Penguin Geek, Father of four > > > On Sat, May 30, 2009 at 15:22, Ryein <[email protected]> wrote: > >> >> not to high jack this thing, but can anyone tell me whats wrong with this >> script >> >> echo -n "Give me a file name! I will append a date to it. " >> read filename >> date >> $filename >> >> if [-f $filename ] >> then >> if [-w $filename ] >> then >> date >> $filename >> echo "$filename was written successfully." >> else >> echo "$filename could not be written." >> fi >> else >> echo "The file you specified is invalid." >> fi >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
