943,633 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Aug 30th, 2009
0

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

Click to Expand / Collapse  Quote originally posted by sknake ...
.... 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....

Click to Expand / Collapse  Quote originally posted by sknake ...
Take your pick
bash Syntax (Toggle Plain Text)
  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...
Reputation Points: 49
Solved Threads: 1
Posting Whiz in Training
riahc3 is offline Offline
297 posts
since May 2008
Aug 30th, 2009
0

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

you shouldn't be cd'ing in a shell script to do backups in my opinion so that should be irrelevant.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Aug 31st, 2009
0

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

Click to Expand / Collapse  Quote originally posted by sknake ...
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.
Reputation Points: 49
Solved Threads: 1
Posting Whiz in Training
riahc3 is offline Offline
297 posts
since May 2008
Aug 31st, 2009
0

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

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?
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Change Layout
Next Thread in Shell Scripting Forum Timeline: How can i display time 5mins ago on Solaris 10





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC