已关闭。此问题需要超过focused。当前不接受答案。
**想要改进此问题吗?**更新此问题,使其仅关注editing this post的一个问题。
4天前关闭。
Improve this question
有人能帮我把这个csh脚本转换成bash脚本吗?谢谢
set cnt = 1
set cntmax = 10
set prod_step = step5
set equi_prefix = filename
while ( ${cnt} <= ${cntmax} )
@ pcnt = ${cnt} - 1
set istep = ${prod_step}_${cnt}
set pstep = ${prod_step}_${pcnt}
if ( ${cnt} == 1 ) then
set pstep = ${equi_prefix}
#Runing a command#
else
#Running a commnd#
endif
#Runing a command#
@ cnt += 1
end
我不擅长写剧本:)谢谢
1条答案
按热度按时间anauzrmj1#
这是一个粗略的bash脚本的快速尝试-看一看https://linuxhint.com/csh-vs-bash-nix-shells/
下面是输出: