2016-04-02 Pic2Pdf LinuxShell LinuxShellSolution Shell 疑惑递归访问,如何给路径标号使用环境变量来解决(但不优雅)123456789101112131415161718#!/bin/bashcount=0function trimDFS() { ls "$1"| while read file do if [ -d "$1/$file" ] then let count+=1 echo "[$count] $1/$file" trimDFS "$1/$file" #else #dos2unix $1"/"$file #echo "$1""/""$file" fi done}trimDFS $1 Title:Pic2Pdf Author:_IDLER_ License: "CC BY-NC-SA 4.0" Keep Link & Author if Distribute. Picture batch to Pdf