cygwin 中如何执行 script ?

cygwin 中如何执行 script ?

各位大虾,小弟最近用cygwin有个现成的脚本,怎么执行呢

我不会执行这个脚本,哭~~~

是不是要输入命令还是怎么的?      
那是什么脚本呢???shell??
如果脚本名叫 kk
那就打入 ./kk,执行它,如果没权限,就chmod +x kk
增加执行权限...      
谢谢[url="http://www.linuxeden.com/forum/member.php?u=34142"]mzjanmin[/url] vbmenu_register("postmenu_458858", true);  ,我现在执行了这个脚本,脚本是这样的:
#!/bin/bash -f
################################################################################
# FILE: case_decompress
# Purpose: This is a simple script to call the jpeg decompression program on
# each .LJPEG file in the current directory.
# Name: Mike Heath
# Date: 1/13/2000
# Copyright: Michael Heath and Dr. Kevin Bowyer 2000
################################################################################
#-------------------------------------------------------------------------------
# Check to see if the environment variable MAMMOCODEDIR is set. If not, set it.
#-------------------------------------------------------------------------------
set isMAMMOCODEDIRset = `setenv | grep -c MAMMOCODEDIR`
if($isMAMMOCODEDIRset == 0) then
   set thisdir = `pwd`
   set mdirectory = `dirname $0`
   cd $mdirectory
   set mcodedir = `pwd`
   set mammocodedir = `dirname $mcodedir`
   cd $thisdir
   setenv MAMMOCODEDIR $mammocodedir
endif
set isMAMMOCODEDIRset = `setenv | grep -c MAMMOCODEDIR`
if($isMAMMOCODEDIRset == 0) then
   echo "The environment variable MAMMOCODEDIR is not set properly."
endif
#-------------------------------------------------------------------------------
# Look for the LJPEG file.
#-------------------------------------------------------------------------------
set thisdir = `pwd`
set ljpeg_exists = `ls -1 *.LJPEG >& /dev/null `
if ($? != 0) then
printf "\nError no LJPEG (.LJPEG) files found in directory %s.\n\n" {$thisdir}
cd ..
exit
endif
#-------------------------------------------------------------------------------
# Decompress all of the LJPEG files in this directory.
#-------------------------------------------------------------------------------
foreach x (`ls *.LJPEG`)
   {$MAMMOCODEDIR}/compression/jpeg -d -s $x
end

我在cygwin用 ./kk 执行报错如下:
setenv:command not found
这是怎么回事啊,小弟安装cygwin时选的是全安装。
vbmenu_register("postmenu_458858", true);      
[QUOTE=harzsoft]谢谢[url="http://www.linuxeden.com/forum/member.php?u=34142"]mzjanmin[/url] vbmenu_register("postmenu_458858", true);  ,我现在执行了这个脚本,脚本是这样的:
#!/bin/bash -f
################################################################################
# FILE: case_decompress
# Purpose: This is a simple script to call the jpeg decompression program on
# each .LJPEG file in the current directory.
# Name: Mike Heath
# Date: 1/13/2000
# Copyright: Michael Heath and Dr. Kevin Bowyer 2000
################################################################################
#-------------------------------------------------------------------------------
# Check to see if the environment variable MAMMOCODEDIR is set. If not, set it.
#-------------------------------------------------------------------------------
set isMAMMOCODEDIRset = `setenv | grep -c MAMMOCODEDIR`
if($isMAMMOCODEDIRset == 0) then
   set thisdir = `pwd`
   set mdirectory = `dirname $0`
   cd $mdirectory
   set mcodedir = `pwd`
   set mammocodedir = `dirname $mcodedir`
   cd $thisdir
   setenv MAMMOCODEDIR $mammocodedir
endif
set isMAMMOCODEDIRset = `setenv | grep -c MAMMOCODEDIR`
if($isMAMMOCODEDIRset == 0) then
   echo "The environment variable MAMMOCODEDIR is not set properly."
endif
#-------------------------------------------------------------------------------
# Look for the LJPEG file.
#-------------------------------------------------------------------------------
set thisdir = `pwd`
set ljpeg_exists = `ls -1 *.LJPEG >& /dev/null `
if ($? != 0) then
printf "\nError no LJPEG (.LJPEG) files found in directory %s.\n\n" {$thisdir}
cd ..
exit
endif
#-------------------------------------------------------------------------------
# Decompress all of the LJPEG files in this directory.
#-------------------------------------------------------------------------------
foreach x (`ls *.LJPEG`)
   {$MAMMOCODEDIR}/compression/jpeg -d -s $x
end

我在cygwin用 ./kk 执行报错如下:
setenv:command not found
这是怎么回事啊,小弟安装cygwin时选的是全安装[/SIZE]。[/COLOR] vbmenu_register("postmenu_458858", true);[/QUOTE]


??这个./KK的名称是我举例时乱写的,具体还得要看你所要执行的脚本的实际文件名,
你不会就按我的意思里直接打入./KK吧??
你应打入:./[你的脚本名称]      
我打的是自己的名字:case_decompress。
好像是不认识setenv,还有foreach也不认识。是不是cygwin装的不全啊,我help foreach也找不到。急........!!!谢谢      
麻烦那位大虾给我看看那个脚本,其时就最后三行有用,就是把所有该目录下的*.LJPEG的文件进行转换,单个的时候用jpeg -d -s filename 就能用,现在就想批处理,因为文件很多,有好几百。不胜感激!!!      
呵呵,已经搞定,用find就可以了。。。