What makes you think you need awk to cut the string? There's powerful shell builtins to handle things like that -- like read, which I illustrated. Running awk, cut, sed, grep etc. in backticks all the time to do one line is probably a mistake.
Perhaps you should post your entire script? I suspect there's lots that can be optimized. Please also explain what your system is and what shell you use.
I'm used to use "awk -F "[pattern]" '{print $[field]}'", it's easy to use and does it's job well. What else could I use?
I only wanted to make a quick little script that shows me how far cp is.
While cp is running, it checks with du the size of the two files and gives me a percentage.
Nothing fancy, and I know that rsync can do that by it's own, but I just tried to maybe learn a bit more by doing it myself. And I just learned something right now, so it was worth it