ReadList with system command problem ?
- To: mathgroup at smc.vnet.net
- Subject: [mg110667] ReadList with system command problem ?
- From: pitooon <pitooon at gmail.com>
- Date: Thu, 1 Jul 2010 08:27:34 -0400 (EDT)
Hello everyone, I am facing a problem that i am unable to trace/undestand. Using Mathematica 6.0 on MacOS, the following "simple" cell evaluation gets stalled at different files every times. fileslist = ReadList["some_list_of_files", String]; Do[ filein = fileslist[[i]]; a = ReadList[ "!perl -ne 'if ($_ =~ /^#/) {$a = 1} elsif ($a == 1) {$_ =~ \s/^(. +):(.*)$/$2/;print}' " <> filein, Number, RecordLists-> True]; , {i, Length[fileslist]} ]; Looping over 2 or 3 files is ok, but higher iteration numbers lead to kernel being stucked ( this number changes at each evaluation tries that i made, sometimes 8, 15 ...) All files have the same format and all perl commands are succeesfull when launched individually on each file. Obviously, i m missing a big point here. Any clue/links/ way of tracing ? Thanks for reading,