I want to get size of file into variable ? How to do that?
ls -l | grep testing.txt | cut -f6 -d\' \'
gave the size but how to store it in
you can do it this way with ls (check man page for meaning of -s)
ls
$ var=$(ls -s1 testing.txt|awk '{print $1}')
Or you can use stat with -c '%s'
stat
-c '%s'
Or you can use find (GNU)
$ var=$(find testing.txt -printf "%s")