![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ls -d does not work | nir_s | Shell Programming and Scripting | 11 | 01-12-2009 12:47 PM |
| FTP doesn't work | Torquemada | UNIX for Dummies Questions & Answers | 2 | 07-13-2008 04:31 PM |
| How does it work? | nat123 | Linux | 1 | 11-05-2007 01:13 AM |
| cant get this to work | iago | UNIX for Dummies Questions & Answers | 6 | 09-06-2007 04:41 PM |
| Script doesn't work, but commands inside work | cheongww | UNIX for Dummies Questions & Answers | 2 | 11-14-2006 10:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Lipo doesn't work
Hi guys,
Am using lipo to merge ppc and i386 version of a static/dylib file based on "file type to load". I am working on Mac OS 10.5.6 and new to shell scripting. Please help me out. This is my code. Code:
echo "This file combine ppc and i386 file to form universal library"
echo "source Path: "
read path
echo "source Path1: "
read path1
echo "destination : "
read dest
echo "file type to load"
read exten
for iFile in `find $path -type f -name $exten`
do
echo $iFile
iFile1="${path1}${iFile##*/}"
echo $iFile1
destFile="${dest}${iFile##*/}"
lipo -create $iFile $iFile1 -output destFile
done
echo "*** Done ***"
|
|
||||
|
Code:
find $path -type f -name "*$exten" |
while read iFile
do
echo $iFile
iFile1=${path1%/}/${iFile##*/}
echo $iFile1
destFile="${dest%/}/${iFile##*/}"
lipo -create "$iFile" "$iFile1" -output "$destFile" # changed the last line
done
It generated this path "/sw/lib/ImageMagick-6.5.4/modules-Q16/codersycbcr.a" which should have been "/sw/lib/ImageMagick-6.5.4/modules-Q16/coders/ycbcr.a" Thank you very much. I normally feed exten wildcards "*.a" or "*.dylib". I need to make checks for file existence. Quote:
|
|
|||||
|
Quote:
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|