无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2097|回复: 1
打印 上一主题 下一主题

[求助] 求助一个LINUX批处理的问题

  [复制链接]
跳转到指定楼层
1#
发表于 2019-5-25 19:32:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大神们好,我在网上看到一个实用的批处理,但是用UBUNTU执行总是出错,能帮我看看有那些问题吗?或者可以修改成WINDOWS的吗?
Shell
#!/bin/sh
find -name \*.cue ! -name "._*" | while read cue; do
        flac=${cue%.*}.flac
        if [ -f "$flac" ]; then
                cwd=${cue%/*}
                flac=`basename "$flac"`
                cue=`basename "$cue"`
                pushd "$cwd"
                metaflac --remove-all "$flac";
                metaflac --import-cuesheet-from="$cue" "$flac" && metaflac --set-tag-from-file="CUESHEET=$cue" "$flac" && rm "$cue"
                popd
        fi
done
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
find -name \*.cue ! -name "._*" | while read cue; do
        flac=${cue%.*}.flac
        if [ -f "$flac" ]; then
                cwd=${cue%/*}
                flac=`basename "$flac"`
                cue=`basename "$cue"`
                pushd "$cwd"
                metaflac --remove-all "$flac";
                metaflac --import-cuesheet-from="$cue" "$flac" && metaflac --set-tag-from-file="CUESHEET=$cue" "$flac" && rm "$cue"
                popd
        fi
done
2#
发表于 2022-3-11 03:43:30 | 只看该作者
不叫“批处理”,叫 shell 脚本。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-12-11 05:31

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表