쉘스크립트 쉘스크립트 * Shell script * for문 - for문은 조건문이 참이면 for문내의 명령을 반복한다. 1. 기본 문법 --------------------------------------------------------------------------- #!/bin/bashrow="첫째 둘째"for mon in $row;do for ((i=0;i Operating System/LINUX 6년 전
Shell Script to recursively list files Shell Script to recursively list files #!/bin/sh # Shell script to find out all the files under a directory and #its subdirectories. This also takes into consideration those files #or directories which have spaces or newlines in their names DIR="." function list_files(){ if !(test -d "$1") then echo $1; return;fi cd "$1" echo; echo `pwd`:; #Display Directory name for i in * do if test -d "$i" #i.. Operating System/UNIX 6년 전