Advertisement
Alexqq11

BIGFILE

Dec 7th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. #!/bin/bash
  2. #t=(`ls -S $1`);echo ${t[0]}
  3.  
  4. max=0
  5. output="not found"
  6. for i in `ls $1`;do
  7.         temp="$1$i"
  8.         if [[ -f  $temp ]];then
  9.                 temp_max=`wc -c $temp`
  10.                 temp_max=($temp_max)
  11.                 temp_max=${temp_max[0]}
  12.                 if [[ $max -lt $temp_max ]];then
  13.                         max=$temp_max
  14.                         output=$i
  15.                 fi
  16.         fi
  17. done
  18. echo "$output"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement