Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Command to view list of files..
- var_list=`ls -lrt /path/infy/ |grep "$cdate"| awk '{print $9}'`
- #Command to store file list in array..
- array_of_file=($var_list)
- if [[ `echo ${array_of_file[*]}` == "" ]]; then
- print "files not received"
- else
- for i in `echo ${array_of_file[*]}`; do
- print "files received. .. and extra procesing"
- done
- fi
- # To Sort array...
- unique_array=$(echo $array_of_file | sort -u)
- for a in ${unique_array[@]}; do
- echo $a
- done
- #ps: powerful linux commands and pipeline will work ;)
- #ref: http://ubuntuforums.org/showthread.php?t=969177
- #ref: http://www.java-samples.com/showtutorial.php?tutorialid=1374
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement