J
Jiri Baum
Jiri:
> > cut -f2 table.txt | sort | uniq -c | sort -n
> > Here, there are four processes in the pipeline, separated by vertical
> > bars. Data goes from left to right:
Ralph:
> Thank you for the detailed description of how to accomplish this on Linux
> using scripting. Take my word as a non-programmer: This will not be
> perceived as easy or simple to anyone who is not a programmer.
I guess the algorithm itself takes a bit of thought; but I contend that there's not much difference between the above syntax and a graphical one that might look something like this (you'll have to imagine the icons):
table.txt
\_________/
|
V
+---------+
| cut |
| field 2 |
+---------+
|
V
+---------+
| sort |
+---------+
|
V
+---------+
| uniq |
| count |
+---------+
|
V
+---------+
| sort |
| numeric |
+---------+
|
V
In fact, the main difference is probably that instead of clicking through property sheets to find the options for count and numeric, you'll be
flipping through man pages looking up the options for count and numeric...
> It is easier for my primitive brain to follow a 20 line VB program to do
> the same thing than to figure out how this simple script works. VB might
> not be efficient but it is much more intuitive.
Partly, it might be that it's a completely different way of programming: the above script is like a factory line, with a conveyor taking the data from one off-the-shelf station to the next. I think LabView is a bit like that, too.
Most other languages are more like a single robot cell, you tell it what to do, in the order you want it done. Even scripting on linux is mostly like that - it's just that some of the steps can be "run this wad of data through A, B, C and D and put the result in file X".
> This reminds me of a contest I saw in 1986/7 for the smallest program for
> sorting names alphabetically. The winner was an APL program that was a
> completely unintelligible collection of punctuation marks and letters
...
Heh, that would be the perl script:
while (<>) {
/\s(\w+)/ or /()/;
$count{$1}++;
}
for (sort keys $count) {
print "$_: $count{$_}";
}
Actually, this sorts it in alphabetical order; if you wanted it sorted by counts, the best way would be something called a Schwartzian Transform,
which is about as bad as it sounds.
Which is why I wasn't recommending perl.
> > > The Linux effort just does not have any signficant marketing efforts
> > > addressing the IA industry.
> > I guess not... apart from Curt and me posting to the A-list...
> That is not marketing...it is evangelizing.
Yup.
> Evangelizing can be an important part of marketing communications
Exactly. The other parts - well, none of us really has the resources to do a worldwide marketing blitz... We do what we can, and for the rest, well, the old saying that a good product sells itself is overstated, but 't has a grain of truth to it.
> Given that Linux is essentially free, some other business model must be
> found that provides the incentive for making this investment in marketing
> before Linux will find its way into the corporate mainstream. IBM seems
> to be finding a business model based around selling high-end servers.
> Maybe that will be the coat tails the rest of the Linux community can
> ride on.
Perhaps... although so far the evangelizing seems to have been doing okay. If it only gets turned into marketing at the potential customers site when someone goes to his or her boss and says `I need this product to do my job' then so be it.
Jiri
--
Jiri Baum <[email protected]>
http://www.csse.monash.edu.au/~jiribvisit the MAT LinuxPLC project at http://mat.sf.net
> > cut -f2 table.txt | sort | uniq -c | sort -n
> > Here, there are four processes in the pipeline, separated by vertical
> > bars. Data goes from left to right:
Ralph:
> Thank you for the detailed description of how to accomplish this on Linux
> using scripting. Take my word as a non-programmer: This will not be
> perceived as easy or simple to anyone who is not a programmer.
I guess the algorithm itself takes a bit of thought; but I contend that there's not much difference between the above syntax and a graphical one that might look something like this (you'll have to imagine the icons):
table.txt
\_________/
|
V
+---------+
| cut |
| field 2 |
+---------+
|
V
+---------+
| sort |
+---------+
|
V
+---------+
| uniq |
| count |
+---------+
|
V
+---------+
| sort |
| numeric |
+---------+
|
V
In fact, the main difference is probably that instead of clicking through property sheets to find the options for count and numeric, you'll be
flipping through man pages looking up the options for count and numeric...
> It is easier for my primitive brain to follow a 20 line VB program to do
> the same thing than to figure out how this simple script works. VB might
> not be efficient but it is much more intuitive.
Partly, it might be that it's a completely different way of programming: the above script is like a factory line, with a conveyor taking the data from one off-the-shelf station to the next. I think LabView is a bit like that, too.
Most other languages are more like a single robot cell, you tell it what to do, in the order you want it done. Even scripting on linux is mostly like that - it's just that some of the steps can be "run this wad of data through A, B, C and D and put the result in file X".
> This reminds me of a contest I saw in 1986/7 for the smallest program for
> sorting names alphabetically. The winner was an APL program that was a
> completely unintelligible collection of punctuation marks and letters
...
Heh, that would be the perl script:
while (<>) {
/\s(\w+)/ or /()/;
$count{$1}++;
}
for (sort keys $count) {
print "$_: $count{$_}";
}
Actually, this sorts it in alphabetical order; if you wanted it sorted by counts, the best way would be something called a Schwartzian Transform,
which is about as bad as it sounds.
Which is why I wasn't recommending perl.
> > > The Linux effort just does not have any signficant marketing efforts
> > > addressing the IA industry.
> > I guess not... apart from Curt and me posting to the A-list...
> That is not marketing...it is evangelizing.
Yup.
> Evangelizing can be an important part of marketing communications
Exactly. The other parts - well, none of us really has the resources to do a worldwide marketing blitz... We do what we can, and for the rest, well, the old saying that a good product sells itself is overstated, but 't has a grain of truth to it.
> Given that Linux is essentially free, some other business model must be
> found that provides the incentive for making this investment in marketing
> before Linux will find its way into the corporate mainstream. IBM seems
> to be finding a business model based around selling high-end servers.
> Maybe that will be the coat tails the rest of the Linux community can
> ride on.
Perhaps... although so far the evangelizing seems to have been doing okay. If it only gets turned into marketing at the potential customers site when someone goes to his or her boss and says `I need this product to do my job' then so be it.
Jiri
--
Jiri Baum <[email protected]>
http://www.csse.monash.edu.au/~jiribvisit the MAT LinuxPLC project at http://mat.sf.net