Hello,
Maybe I am missing something. I want to print the number of lines in a text file loaded into 'msgfile' OR equivalent object. The object seems to do everything but that!! Am i missing something right in front of me? I just need to know the number of lines in a text file that i load...
Thanks!!!
BTW 'msgfile-help.pd' is missing in my pd-extended recent auto-build...
cheers mark
mark edward grimm | m.f.a | ed.m
syracuse u. | vpa foundations | timearts
adjunct | new media consultant
megrimm.net | socialmediagroup.org & .com
mgrimm@syr.edu | 315.378.2136
________________________________________
If I understand you correctly, you will need to iterate over the file, counting each line as you iterate over it. You could also try using one of the externals that handles shell commands and then use 'wc' to count the words and lines in your file.
Mike
On Fri, May 2, 2008 at 4:46 PM, mark edward grimm mgrimm@syr.edu wrote:
Hello,
Maybe I am missing something. I want to print the number of lines in a text file loaded into 'msgfile' OR equivalent object. The object seems to do everything but that!! Am i missing something right in front of me? I just need to know the number of lines in a text file that i load...
Thanks!!!
BTW 'msgfile-help.pd' is missing in my pd-extended recent auto-build...
cheers mark
mark edward grimm | m.f.a | ed.m syracuse u. | vpa foundations | timearts adjunct | new media consultant megrimm.net | socialmediagroup.org & .com mgrimm@syr.edu | 315.378.2136 ________________________________________
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
with msgfile, you should be able to send [end, where( to the messagefile, which first jumps to the end end then tells you the current position (line number). the first line is 0, so you have to add 1 to the number to get the number of lines. marius.
mark edward grimm wrote:
Hello,
Maybe I am missing something. I want to print the number of lines in a text file loaded into 'msgfile' OR equivalent object. The object seems to do everything but that!! Am i missing something right in front of me? I just need to know the number of lines in a text file that i load...
Thanks!!!
BTW 'msgfile-help.pd' is missing in my pd-extended recent auto-build...
cheers mark
mark edward grimm | m.f.a | ed.m syracuse u. | vpa foundations | timearts adjunct | new media consultant megrimm.net | socialmediagroup.org & .com
mgrimm@syr.edu | 315.378.2136 ________________________________________
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Awesome! I must have missed that in the non-existent help file i had to search the internet for.... :)
also i was a little confused because the help file i found uses [when( in the comments and [where( as a message...
all is good though!! so thanks for this marius!
[end, where( actually only gave me a "bang" message from the second outlet but what worked for me was [end, skip -1, where(
thanks again!
cheers mark --- marius schebella marius.schebella@gmail.com wrote:
with msgfile, you should be able to send [end, where( to the messagefile, which first jumps to the end end then tells you the current position (line number). the first line is 0, so you have to add 1 to the number to get the number of lines. marius.
mark edward grimm wrote:
Hello,
Maybe I am missing something. I want to print the number of lines in a text file loaded into
'msgfile'
OR equivalent object. The object seems to do everything but that!! Am i missing something right
in
front of me? I just need to know the number of
lines
in a text file that i load...
Thanks!!!
BTW 'msgfile-help.pd' is missing in my pd-extended recent auto-build...
cheers mark
mark edward grimm | m.f.a | ed.m syracuse u. | vpa foundations | timearts adjunct | new media consultant megrimm.net | socialmediagroup.org & .com
mgrimm@syr.edu | 315.378.2136 ________________________________________
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
mark edward grimm | m.f.a | ed.m
syracuse u. | vpa foundations | timearts
adjunct | new media consultant
megrimm.net | socialmediagroup.org & .com
mgrimm@syr.edu | 315.378.2136
________________________________________
mark edward grimm wrote:
Awesome! I must have missed that in the non-existent help file i had to search the internet for.... :)
also i was a little confused because the help file i found uses [when( in the comments and [where( as a message...
all is good though!! so thanks for this marius!
[end, where( actually only gave me a "bang" message from the second outlet but what worked for me was [end, skip -1, where(
yes, I wanted to say that first, but then I tried it, and it worked with only end, where. maybe it only works if you clicked rewind first? maybe it also depends on the version of msgfile. don't know. be sure to test, if you really get the correct number. marius.