[H-GEN] ksh scripting problem

Greg Black gjb at gbch.net
Sat Aug 23 22:57:26 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On 2003-08-24, Scott Pullen wrote:

[Please, if you are going to start a new thread by replying to
some random message, either take the time to edit the headers if
you're using a real mailer or find some other way of copying the
list address into your message -- this was posted in such a way
that it appears as part of some completely irrelevant thread and
that's really annoying to people who read lots of email and have
taken the trouble to set things up carefully.]

> How do I copy files using the i-node instead of the filename?

You don't.

> eg the code looks something like this
> 
> for $entity in `ls $source$entry`
> do
> 	if [[ -d $entity ]]; then
> 		recursively call function
> 	fi
> 
> 	if [[ -f $entity && -r $entity ]]; then
> 		cp $entity $newdir$source$entry
> 	fi
> done

Well, there's plenty of evidence that the code doesn't look like
that -- try to post the code you really tried rather than some
variant that you invent for the purpose.

If you really want to do what you appear to be attempting here,
why are you not using the standard utility that god provided for
this task: pax?  If you're trying to do something else and it's
not just an exercise, maybe you could give us some more data.

Cheers, Greg

-- 
Greg Black <gjb at gbch.net> <http://www.gbch.net/gjb.html>
GPG signed mail preferred; further information in headers.

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list