The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to capture new lines in a file and copy it to new file fara_aris Shell Programming and Scripting 0 05-27-2008 07:11 PM
Shell script to search for text in a file and copy file imeadows UNIX for Dummies Questions & Answers 8 04-20-2008 01:41 PM
reading an already complied excutable file richardsamuelk UNIX for Dummies Questions & Answers 4 10-04-2007 07:31 AM
Help:Copy file from one to other using script sunnysunny Shell Programming and Scripting 2 08-07-2006 07:45 AM
how to find Script file location inside script asami Shell Programming and Scripting 10 03-14-2006 08:57 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2006
Registered User
 

Join Date: Dec 2006
Posts: 2
Question executable script to copy a file to a different location.

Hi,
I'm try to create an executable file to copy a file to a different location.
Help plz.

Thanx.

Last edited by nazehcalil; 12-19-2006 at 08:51 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-19-2006
Registered User
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
Code:
script
#################
cp /dir1/dir2/fl1 /dr1/dr2
#################
Code:
chmod 755 script
Reply With Quote
  #3 (permalink)  
Old 12-20-2006
Registered User
 

Join Date: Dec 2006
Posts: 2
Exclamation

Hi, do I need to run from the shell ?

Thanks,
Reply With Quote
  #4 (permalink)  
Old 12-20-2006
Registered User
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
Either insert the current directory in PATH environment variable
Code:
$PATH=$PATH":."
$script
or

Code:
$/dir1/dir2/script
Here first $ is the command prompt.
Reply With Quote
  #5 (permalink)  
Old 12-21-2006
Registered User
 

Join Date: Dec 2006
Location: Maryland
Posts: 144
the cp command itself does 'what you need'. Why do you need a shell script to cal the cp command ?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0