PDA

View Full Version : Bash: How to loop thru big file contents?



Fli
11-08-2014, 03:57 PM
Hi, i have 450Mb file with content, one per line.

I need to do an action for each line, so i thought to use


for i in $(cat filename);do
echo "$i"
done

but it returns error:

xrealloc: cannot reallocate 449492864 bytes (0 bytes allocated)

i dotn want to upgrade to a higher RAM VPS, how can i solve this smartly?