FreeBSD 5.2.1-R ¤Ë lha¡Êautoconf/automake Èǡˤò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿µÏ¿¡£
º£ÅÙ¡¢UNIX ¥µ¡¼¥Ð¾å¤Î¥×¥í¥°¥é¥àÆâ¤Ç¡¢Windows ¥Þ¥·¥ó¤Ç¥¢¡¼¥«¥¤¥Ö¤·¤¿¥Õ¥¡¥¤¥ë¤ò²òÅࡦ¿Ä¹¤·¤Æ¤ä¤ëɬÍפ¬½Ð¤Æ¤¤¿¡£¥¿¡¼¥²¥Ã¥È¥Þ¥·¥ó¤Ï Sun Cobalt ¤À¤¬¡¢³«È¯¤Ë»È¤¦¤Î¤Ï FreeBSD ¤Ç¤¢¤ë¡£
¼Â¤Ï¡¢³«È¯¤Ë»È¤¦ FreeBSD 5.2.1-RELEASE-p10 ¤Ë¤Ï packages ¤«¤é lha-1.14i_2 ¤òÆþ¤ì¤Æ¤¤¤ë¡£¤³¤¤¤Ä¤ò³°Éô¥×¥í¥°¥é¥à¤È¤·¤Æ¼Â¹Ô¤·¤Æ¤ä¤ì¤Ð¤¨¤¨¤ï¤±¤ä¤Í¡£
zakuro# pkg_info|grep lha
lha-1.14i_2 Archive files using LZSS and Huffman compression (.lzh file
¤·¤«¤·¡¢¥°¥°¤Ã¤Æ¤ß¤ë¤È¡¢lha ¤Ë¤Ï 5.2.1-RELEASE ¤Î packages ¤ËÆþ¤Ã¤¿¸å¤Ë¹¹¿·¤µ¤ì¤¿ÈǤ¬¤¢¤ë¤Î¤Ç¡¢¤½¤ÎºÇ¿·ÈǤǤ¢¤ë lha-1.14i-ac20040929 ¤ò¥½¡¼¥¹¤«¤é¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤ß¤¿¡£
¥¤¥ó¥¹¥È¡¼¥ë¤ÎÁ°¤Ë¡¢packages ¤«¤éÆþ¤ì¤¿ lha ¤òÂÔÈò¤·¤Æ¤ª¤¯¡£
zakuro# mv /usr/local/bin/lha /usr/local/bin/lha.org
¤Þ¤º¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¼èÆÀ¡£
http://sourceforge.jp/projects/lha ¤«¤é¥ê¥ó¥¯¤òÅÁ¤Ã¤Æ¤¤¤Ã¤Æ¡¢
http://prdownloads.sourceforge.jp/lha/11617/lha-1.14i-ac20040929.tar.gz
¤ò¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¡£
°ÊÁ°¤Î lha ¤Ï¼êÆ°¤Ç¥³¥ó¥Ñ¥¤¥é¤Î¥ª¥×¥·¥ç¥ó¤Ê¤ÉÍ¿¤¨¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ëɬÍפ¬¤¢¤Ã¤¿¤è¤¦¤À¤¬¡¢º£¤Ï autoconf/automake ²½¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¤ï¤·¤Î¤è¤¦¤Ê¡ÖC ¤ÎÀ¤³¦¤Ï¤Á¤ç¤Ã¤È¡¦¡¦¡¦¡×¤È¤¤¤¦¿Í´Ö¤Ë¤â´Êñ¤Ë make ½ÐÍè¤Æ¤¢¤ê¤¬¤¿¤¤¤³¤È¤Ç¤¢¤ë¡£
¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Õ¥¡¥¤¥ë¤ò²òÅࡦ¿Ä¹¡£
zakuro# pwd
/usr/local/src
zakuro# tar xvfz lha-1.14i-ac20040929.tar.gz
lha-1.14i-ac20040929/
lha-1.14i-ac20040929/tests/
lha-1.14i-ac20040929/tests/Makefile.in
¡ãά¡ä
lha-1.14i-ac20040929/src/util.c
lha-1.14i-ac20040929/src/lhdir.h
lha-1.14i-ac20040929/src/fnmatch.h
¤Ç¤Ï¡¢Áá® configure ¤·¤Æ¤«¤é make ¼Â¹Ô¡£autoconf ¤ËÂбþ¤·¤¿¥½¥Õ¥È¤Î¥¤¥ó¥¹¥È¡¼¥ë¤ÏËÜÅö¤Ë³Ú¤À¡£
zakuro# cd lha-1.14i-ac20040929
zakuro# ./configure
checking build system type... i386-unknown-freebsd5.2.1
checking host system type... i386-unknown-freebsd5.2.1
checking target system type... i386-unknown-freebsd5.2.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
¡ãά¡ä
config.status: creating tests/lha-test
config.status: creating config.h
config.status: executing depfiles commands
zakuro# make
make all-recursive
Making all in man
Making all in olddoc
Making all in src
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DEUC -DSUPPORT_LH7 -g -O2 -MT append.o -MD -MP -MF ".deps/append.Tpo" -c -o append.o `test -f 'append.c' || echo './'`append.c; then mv -f ".deps/append.Tpo" ".deps/append.Po"; else rm -f ".deps/append.Tpo"; exit 1; fi
¡ãά¡ä
gcc -g -O2 -o lha append.o bitio.o crcio.o dhuf.o extract.o header.o huf.o indicator.o larc.o lhadd.o lharc.o lhext.o lhlist.o maketbl.o maketree.o patmatch.o shuf.o slide.o util.o
Making all in tests
"Makefile", line 287: warning: duplicate script for target "lha-test" ignored
¤à¤à¡¦¡¦¡¦¡£¤Ê¤ó¤« Makefile ¤Î´û½Ò¤Ë¤Ä¤¤¤Æ¤Î¥ï¡¼¥Ë¥ó¥°¤¬¡¦¡¦¡¦
¥ï¡¼¥Ë¥ó¥°¤À¤«¤é¤Û¤Ã¤Æ¤ª¤¯¤«¡¦¡¦¡¦
zakuro# make install
Making install in man
/bin/sh ../mkinstalldirs /usr/local/man/mann
/usr/bin/install -c -m 644 ./lha.n /usr/local/man/mann/lha.n
Making install in olddoc
Making install in src
/bin/sh ../mkinstalldirs /usr/local/bin
/usr/bin/install -c lha /usr/local/bin/lha
Making install in tests
"Makefile", line 287: warning: duplicate script for target "lha-test" ignored
"Makefile", line 287: warning: duplicate script for target "lha-test" ignored
¤¢¤ì¤ì¡¦¡¦¡¦ make install ¤Ç¤â¥ï¡¼¥Ë¥ó¥°¤¬½Ð¤¿¤Ê¡£¤Ç¤â¡¢¤Þ¤¢¡¢¥ï¡¼¥Ë¥ó¥°¤À¤«¤é¡£Îɤ·¤È¤·¤è¤¦¡£
¤Ç¡¢¤Ç¤¤¢¤¬¤Ã¤¿¥Õ¥¡¥¤¥ë¤ò¸«¤Æ¤ß¤ë¡£
zakuro# ls -la /usr/local/bin/lha*
-rwxr-xr-x 1 root wheel 273996 Mar 13 15:35 /usr/local/bin/lha
-r-xr-xr-x 1 root wheel 52060 Mar 13 14:39 /usr/local/bin/lha.org
packages ¤ÇÆþ¤ì¤¿ lha ¤è¤ê¡¢¤¨¤é¤¯µðÂç¤Ë¤Ê¤Ã¤Æ¤ë¤Ê¡¦¡¦¡¦
¥Ø¥ë¥×¤ò¸«¤Æ¤ß¤ë¤È¡¢
¢¡lha-1.14i-ac20040929
usage: lha [-]<commands>[<options>] [-<options> ...] archive_file [file...]
commands: [axelvudmcpt]
options: [q[012]vnfto[567]dizg012e[w=<dir>|x=<pattern>]]
¢¡lha-1.14i_2
usage: lha [-]{axelvudmcp[q[num]][vnfodizg012]}[w=<dir>] archive_file [file...]
¤È¤¤¤¦¤³¤È¤Ç¡¢lha-1.14i_2 ¤Ï usage ¤Ë command ¤ä option ¤Î t ¤òºÜ¤»¤Æ¤Ê¤«¤Ã¤¿¤ê¤·¤Æ¡¢¤Ê¤ó¤«ÊÑ¡£
¤Þ¤¢¡¢x=<pattern> ¤È¤¤¤¦¥ª¥×¥·¥ç¥ó¤¬ lha-1.14i-ac20040929 ¤ÎÊý¤Ë¤ÏÄɲ䵤ì¤Æ¤¤¤¿¤ê¤¹¤ë¤Î¤Ç¡¢¤½¤ì¤âÂ礤¯¤Ê¤Ã¤¿¸¶°ø¤Ê¤ó¤À¤í¤¦¤±¤É¡¢Íפϡ¢packages ¤Î lha ¤Ï¥³¥ó¥Ñ¥¤¥ë»þ¤ËºÇŬ²½¤µ¤ì¤Æ¤¿¤ó¤À¤í¤¦¤Ê¤¢¡£
¤Þ¡¢Ê̤˥·¥Ó¥¢¤Ê¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤òɬÍפȤ¹¤ë¤ï¤±¤¸¤ã¤Ê¤¤¤Î¤Ç¡¢¤³¤ì¤Ï¤³¤ì¤Ç¤¤¤¤¤Î¤À¡£
¤¸¤ã¡¢Windows ¾å¤ÇÆüËܸì¤ò´Þ¤à̾Á°¤Î¥Õ¥¡¥¤¥ë¤ò°µ½Ì¤·¤¿ LZH ¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ¥Æ¥¹¥È¤·¤Æ¤ß¤ë¡£
%lha l temp20050312.lzh
PERMISSION UID GID SIZE RATIO STAMP NAME
---------- ----------- ------- ------ ------------ --------------------
[MS-DOS] 23432 18.0% Mar 10 11:10 01Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 23060 17.7% Mar 10 11:10 01Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 26740 20.2% Mar 10 11:10 02Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 37496 16.9% Mar 10 11:10 02Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 24001 19.9% Mar 10 11:10 03Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 23556 17.9% Mar 10 11:10 03Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 16640 19.1% Mar 10 11:10 05Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 16328 19.8% Mar 10 11:10 05Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 18644 16.6% Mar 10 11:10 06Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 18644 16.9% Mar 10 11:10 06Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 12460 19.1% Mar 10 11:10 07Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 9964 21.6% Mar 10 11:10 07Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 10255 20.2% Mar 10 11:10 08Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 10255 19.8% Mar 10 11:10 08Ä̾ïÊ¿Æü¾åÄ̲á.csv
[MS-DOS] 5904 25.0% Mar 10 11:10 09Ä̾ïÊ¿Æü²¼Ä̲á.csv
[MS-DOS] 5904 24.9% Mar 10 11:10 09Ä̾ïÊ¿Æü¾åÄ̲á.csv
---------- ----------- ------- ------ ------------ --------------------
Total 16 files 283283 18.8% Mar 13 15:53
%lha e -e temp20050312.lzh
01Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : ooo
01Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : ooo
02Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : oooo
02Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : ooooo
03Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : ooo
03Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : ooo
05Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : ooo
05Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : oo
06Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : ooo
06Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : ooo
07Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : oo
07Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : oo
08Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : oo
08Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : oo
09Ä̾ïÊ¿Æü²¼Ä̲á.csv - Melted : o
09Ä̾ïÊ¿Æü¾åÄ̲á.csv - Melted : o
%ls -la
total 354
drwxr-xr-x 2 shinoda admin 1024 Mar 13 16:05 .
drwxr-xr-x 3 shinoda admin 512 Mar 13 15:55 ..
-rw-r--r-- 1 shinoda admin 23432 Mar 10 11:10 01??????????????.csv
-rw-r--r-- 1 shinoda admin 23060 Mar 10 11:10 01??????????????.csv
-rw-r--r-- 1 shinoda admin 26740 Mar 10 11:10 02??????????????.csv
-rw-r--r-- 1 shinoda admin 37496 Mar 10 11:10 02??????????????.csv
-rw-r--r-- 1 shinoda admin 24001 Mar 10 11:10 03??????????????.csv
-rw-r--r-- 1 shinoda admin 23556 Mar 10 11:10 03??????????????.csv
-rw-r--r-- 1 shinoda admin 16640 Mar 10 11:10 05??????????????.csv
-rw-r--r-- 1 shinoda admin 16328 Mar 10 11:10 05??????????????.csv
-rw-r--r-- 1 shinoda admin 18644 Mar 10 11:10 06??????????????.csv
-rw-r--r-- 1 shinoda admin 18644 Mar 10 11:10 06??????????????.csv
-rw-r--r-- 1 shinoda admin 12460 Mar 10 11:10 07??????????????.csv
-rw-r--r-- 1 shinoda admin 9964 Mar 10 11:10 07??????????????.csv
-rw-r--r-- 1 shinoda admin 10255 Mar 10 11:10 08??????????????.csv
-rw-r--r-- 1 shinoda admin 10255 Mar 10 11:10 08??????????????.csv
-rw-r--r-- 1 shinoda admin 5904 Mar 10 11:10 09??????????????.csv
-rw-r--r-- 1 shinoda admin 5904 Mar 10 11:10 09??????????????.csv
-rw-r--r-- 1 shinoda admin 54077 Mar 13 15:53 temp20050312.lzh
¤¦¡Á¤à¡¢²½¤±²½¤±¤¸¤ã¤Î¤ª¡£
¤ï¤·¤Î locale ¤Ç EUC ¤òÀßÄꤷ¤Æ¤Ê¤¤¤«¤é¤«¤¤¤Î¤ª¡©
perl ÆâÉô¤«¤éÆüËܸì¥Õ¥¡¥¤¥ë̾¤¬°ú¤±¤ë¤«¤ä¤Ã¤Æ¤ß¤ë¡£
%cat > test.pl
open (IN, "01Ä̾ïÊ¿Æü²¼Ä̲á.csv");
@d = <IN>;
close(IN);
print $d[0];
print $d[1];
print $d[2];
print $d[3];
exit();
¤³¤ó¤Ê´¶¤¸¤Î¥×¥í¥°¥é¥à¤òºîÀ®¡£¤³¤ì¤ò¼Â¹Ô¤·¤Æ¡Ö01Ä̾ïÊ¿Æü²¼Ä̲á.csv¡×¤¬Æɤ߹þ¤á¤ì¤ÐÌäÂê¤Ê¤·¡£
%perl test.pl
1,²¼,Ê¿Æü,2005/2/11,,,,,,,,,,,,,,,,,,,,,,,
¹Åç±Ø,±îàͶ¶Ä®,Ū¾ìÄ®¡ÊËÜ¡Ë, °ð²ÙÄ®,¶ä»³Ä®,¸ÕÄ®,ȬÃúËÙ¡ÊËÜ¡Ë,ΩĮ,»æ²°Ä®Åì,ËÜÄÌ ,ÂÞÄ®,ÃæÅÅÁ°,»ÔÌò½êÁ°,ÂëÌ,ÆüÀÖɱ¡Á°,¹ÅÅËܼÒÁ°,¸æ¹¬¶¶,³§¼ÂÄ®£¶ÃúÌÜ¡ÊËÜ,¹ÂçÉÕ°³Ø¹»Á°,¸©É±¡Á°,±§ÉÊ£²ÃúÌÜ,±§ÉÊ£³ÃúÌÜ,±§ÉÊ£´ÃúÌÜ,±§ÉÊ£µÃúÌÜ,³¤´ßÄÌ,¸µ±§Éʸý ,¹Åç¹Á
,,,,,,,,,,,,,,,5:59, 6:00, 6:02, 6:03, 6:04, 6:05, 6:06, 6:07, 6:08, 6:09, 6:11, 6:15,,,,,,,,,,,,,,,6:08, 6:09, 6:11, 6:12, 6:13, 6:14, 6:15, 6:16, 6:17, 6:18, 6:20, 6:24
¤ª¤ª¡¢¤Á¤ã¤ó¤ÈÆɤá¤Æ¤ë¤¸¤ã¤ó¡£
¤µ¤¹¤¬ÆüËܤÎÀ¸¤ó¤À archiver¡ª¡ª¤Á¤ã¤ó¤È EUC ¥³¡¼¥É¤Ç½ÐÎϤ·¤Æ¤¤¤ë¤è¤¦¤À¡£
¼Â¤Ï¤³¤ì¡¢
%lha e -e temp20050312.lzh
¤È¤¤¤¦¶ñ¹ç¤Ë -e ¥ª¥×¥·¥ç¥ó¡ÊTEXT code convert from/to EUC¡Ë¤òÉÕ¤±¤Æ¤¤¤ë¤Î¤Ç¡¢²òÅà»þ¤Ë TEXT ¥Õ¥¡¥¤¥ë¤Î¥³¡¼¥É¤ò EUC ÊÑ´¹¤·¤Æ¤¯¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¥Õ¥¡¥¤¥ë¤ÎÃæ¿È¤â¤Á¤ã¤ó¤È EUC ¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ë¡£
¤¿¤Àñ¤Ë¡¢
%lha e temp20050312.lzh
¤È¤¹¤ë¤È¡¢¥Õ¥¡¥¤¥ë¤ÎÃæ¿È¤Ï Shift_JIS ¤Î¤Þ¤Þ¤Ç¤¢¤ë¡£¡Ê¤Þ¤¢¡¢¤½¤ì¤Ç¤â¥Õ¥¡¥¤¥ë̾¤Ï EUC ÊÑ´¹¤µ¤ì¤ë¤Î¤Ç¥×¥í¥°¥é¥àÆ⤫¤é¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤³¤È¤Ï½ÐÍè¤ë¤±¤É¤Í¡Ë
lha ¤Ç¤ÏÆüËܸì¥Õ¥¡¥¤¥ë̾¤ÎÍøÍѤ¬ OK ¤Î¤è¤¦¤Ê¤Î¤Ç¡¢unzip¡ÊZIP ¥Õ¥¡¥¤¥ë¤Î²òÅà¡Ë¤â»î¤·¤Æ¤ß¤ë¡£
%unzip temp20050312.zip
Archive: temp20050312.zip
inflating: 05Êí ”Ö Êß.csv
inflating: 05Êí•¡ ß®csv
inflating: 06Êí ”Ö Êß.csv
inflating: 06Êí•¡ ß®csv
inflating: 07Êí ”Ö Êß.csv
inflating: 07Êí•¡ ß®csv
inflating: 08Êí ”Ö Êß.csv
inflating: 08Êí•¡ ß®csv
inflating: 09Êí ”Ö Êß.csv
inflating: 09Êí•¡ ß®csv
inflating: 01Êí ”Ö Êß.csv
inflating: 01Êí•¡ ß®csv
inflating: 02Êí ”Ö Êß.csv
inflating: 02Êí•¡ ß®csv
inflating: 03Êí ”Ö Êß.csv
inflating: 03Êí•¡ ß®csv
¤ï¡¢¤ï¡£ÂÌÌܤÀ¡¢¤³¤ê¤ã¡£²½¤±²½¤±¡£
%perl test.pl
%
¥Õ¥¡¥¤¥ë̾¤â Shift_JIS ¤Ç½ÐÎϤµ¤ì¤Æ¤·¤Þ¤¦¤Î¤Ç¡¢EUC ¤Ç½ñ¤¤¤¿ perl ¥×¥í¥°¥é¥àÆâ¤Ç»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë̾¤È¤Ï¥Þ¥Ã¥Á¤·¤Ê¤¤¤ó¤À¤Ê¤¢¡£
¤Þ¤¢¡¢¥×¥í¥°¥é¥àÆâ¤Ç Shift_JIS ¤ËÊÑ´¹¤·¤Æ¤ä¤ì¤ÐÎɤ¤¤ó¤À¤í¤¦¤±¤É¡¢¤ä¤Ï¤êµ¤»ý¤Á¤ï¤ë¤¤¤Ê¤¢¡¦¡¦¡¦¡£
ÆüËܸì¤Îº®¤¶¤Ã¤¿¥Õ¥¡¥¤¥ë̾¤ò»ÈÍѤ¹¤ë»þ¤Ï lha ºÇ¹â¡ª¡ªunzip ¤ÏÂÌÌÜ¡¢ÂÌÌÜ¡£
¤È¤¤¤¦¤³¤È¤Ç¡¢LHA ºÇ¹â¡ªºÇ¹â¡ª¡ª
|
|