ah this works, I adjusted as follows for IDX in {0..65535}; do echo $IDX >> /home/netflow/etc/0-65535.txt done Thanks for the help was in a bind there. Been a while since I shell scripted.:) On Jun 25, 2014, at 2:02 PM, John G. Heim <jheim@math.wisc.edu> wrote:
for IDX in {0..65535}; do [...] done
On 06/25/14 12:53, Scott Granados wrote:
I’m trying to write a small script in bash and it’s not working.
I want to count from 0 to 65535 and put that number, 1 per line in a flat file
I was trying something like this COUNT=0 while [$COUNT -lt 65536] do echo $COUNT >> /home/netflow/etc/0-65535.txt COUNT=`expr $COUNT + 1` done
I keep getting a bash “0 invalid command” Anyone know how to write this expression correctly so it populates the file?
Thanks Scott
_______________________________________________ Blind-sysadmins mailing list Blind-sysadmins@lists.hodgsonfamily.org http://lists.hodgsonfamily.org/listinfo/blind-sysadmins
-- --- John G. Heim, 608-263-4189, jheim@math.wisc.edu
_______________________________________________ Blind-sysadmins mailing list Blind-sysadmins@lists.hodgsonfamily.org http://lists.hodgsonfamily.org/listinfo/blind-sysadmins