The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Shell script to search for text in a file and copy file imeadows UNIX for Dummies Questions & Answers 9 11-12-2008 09:12 PM
Script to capture new lines in a file and copy it to new file fara_aris Shell Programming and Scripting 0 05-27-2008 10:11 PM
reading an already complied excutable file richardsamuelk UNIX for Dummies Questions & Answers 4 10-04-2007 10:31 AM
Help:Copy file from one to other using script sunnysunny Shell Programming and Scripting 2 08-07-2006 10:45 AM
how to find Script file location inside script asami Shell Programming and Scripting 10 03-15-2006 12:57 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-19-2006
nazehcalil nazehcalil is offline
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-20-2006 at 12:51 AM..
  #2 (permalink)  
Old 12-20-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Code:
script
#################
cp /dir1/dir2/fl1 /dr1/dr2
#################
Code:
chmod 755 script
  #3 (permalink)  
Old 12-21-2006
nazehcalil nazehcalil is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 2
Exclamation

Hi, do I need to run from the shell ?

Thanks,
  #4 (permalink)  
Old 12-21-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

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

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

Join Date: Dec 2006
Location: Maryland
Posts: 162
the cp command itself does 'what you need'. Why do you need a shell script to cal the cp command ?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0