Jun 4, 2003 #1 Meher1 Programmer Jun 4, 2003 7 US Hi, I'm very new to unix shell scripting. Need some help. I have to loop through a few files in a directory. for i in $files do awk -f test.awk $i done If my directory is /X how do I assign files to? files= ? TIA
Hi, I'm very new to unix shell scripting. Need some help. I have to loop through a few files in a directory. for i in $files do awk -f test.awk $i done If my directory is /X how do I assign files to? files= ? TIA
Jun 4, 2003 1 #2 vgersh99 Programmer Jul 27, 2000 2,146 US #!/bin/ksh # to list ALL files with the '.sh' extention under /tmp dir='/tmp' for i in ${dir}/*.sh do echo "file-> [${i}]" done vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
#!/bin/ksh # to list ALL files with the '.sh' extention under /tmp dir='/tmp' for i in ${dir}/*.sh do echo "file-> [${i}]" done vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+