Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. set index=0
  2. set usrlist[index]="null"
  3.  
  4.  
  5. while read line
  6. do
  7.  
  8. #Total lines read
  9. z=`echo $line| wc -l`
  10. lines=`expr $lines + $z`
  11.  
  12. # 2) #total unique user
  13. linesED=`echo $line | sed 's/[0-9]//g'`
  14. linesEDA=`echo ${linesED:10}`
  15. userr=`echo $linesEDA | awk '{print $1}'`
  16.  
  17. for i in z
  18. do
  19. usrlist[i]=$userr
  20. done
  21. index=`expr $index + $i`
  22. echo ${usrlist[index]}# prints out data correctly but with
  23. #error expr:non-integer argument
  24. done
  25. echo ${usrlist[index]}#here blank output only
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement