Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Feb 15th, 2005, 6:12 PM   #1
magyarkid
Newbie
 
Join Date: Jan 2005
Location: Virginia USA
Posts: 6
Rep Power: 0 magyarkid is on a distinguished road
Send a message via AIM to magyarkid
Help Me!!

HEEELLLLPPPP!!!!
I've been developing a basic suite of apps to get to know Shell Scripting in Fedora 1 Linux. I have 2 applications done and bug-free, but my third is no... here is the code:
#-------------Credits------------
# (C) 2005 Kid Kompany
# Written by Chris Szentkiralyi
# v1.5
#--------------------------------
#!/bin/sh

makeDir() {
	if mkdir "_$dir"
	then
		echo "Directory _$dir created..."
	else
		echo "ERROR: Directory could not be created"
	fi
}
changeDir() {
	if cd "_$dir"
	then
		echo "Directory changed to $dir"
	else
		ECHO "ERROR: Directory could not be changed"
	fi
}
copyFiles() {
	if cp *.* _$dir
	then
		echo "Files copied to _$dir"
	else
		echo "ERROR: Could not copy files to _$dir"
	fi
}
read dir
makeDir
changeDir
copyFiles
The problem is that I can't seem to get the copyFiles() function to work right. It won't let me use '*.*' to copy all of the files... and I am out of ideas. PLEASE HELP!!!
__________________
Signed,
Magyarkid
magyarkid is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:20 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC