A shell script that makes backup copies of changed files (also involving CRON)

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2008
Posts: 82
Reputation: riahc3 is an unknown quantity at this point 
Solved Threads: 0
riahc3 riahc3 is offline Offline
Junior Poster in Training

Re: A shell script that makes backup copies of changed files (also involving CRON)

 
0
  #11
Aug 30th, 2009
Originally Posted by sknake View Post
.... you have a long road ahead of you
Rome wasnt built in a day right? Even though I have to get Rome done in alot less days....

Originally Posted by sknake View Post
Take your pick
  1. sk@sk:~$ pwd
  2. /home/wheel/sk
  3. sk@sk:~$ echo ${PWD}
  4. /home/wheel/sk
AFAIK, pwd is just a function that returns the current path and $PWD is just a variable that changes each time Im at a new path.

Correct? So the best way (IMO) would be just simply using path...
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,338
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 602
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: A shell script that makes backup copies of changed files (also involving CRON)

 
0
  #12
Aug 30th, 2009
you shouldn't be cd'ing in a shell script to do backups in my opinion so that should be irrelevant.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 82
Reputation: riahc3 is an unknown quantity at this point 
Solved Threads: 0
riahc3 riahc3 is offline Offline
Junior Poster in Training

Re: A shell script that makes backup copies of changed files (also involving CRON)

 
0
  #13
Aug 31st, 2009
Originally Posted by sknake View Post
you shouldn't be cd'ing in a shell script to do backups in my opinion so that should be irrelevant.
Not sure what you ment by cd'ing....I havent used cd in anything Ive said.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,338
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 602
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: A shell script that makes backup copies of changed files (also involving CRON)

 
0
  #14
Aug 31st, 2009
Well pwd gives you the current directory. In a shell script if you're not using 'cd' then the result of 'pwd' would never change -- thus raising the question of why use it?
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Shell Scripting
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC