Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wordcount.sh #74

Open
wants to merge 11 commits into
base: gh-pages
from
Open

wordcount.sh #74

wants to merge 11 commits into from

Conversation

@castelao
Copy link

@castelao castelao commented Dec 19, 2016

In response to issue #48 , a word counting in bash.

@gcapes
Copy link
Contributor

@gcapes gcapes commented Dec 20, 2016

Thanks for your PR. It's on my to-do list and I hope to look at it this week.
Cheers

@gcapes
Copy link
Contributor

@gcapes gcapes commented Dec 21, 2016

I've had a look at this now and have two initial comments:

  1. The output is close enough, but it's much slower than using wordcount.py
  2. It would need a corresponding plotcount.sh script too

If we can overcome these two issues I think it would be worth pursuing.
Cheers
Gerard

@castelao
Copy link
Author

@castelao castelao commented Dec 23, 2016

@gcapes , does the new version satisfy comment 1?

@gcapes
Copy link
Contributor

@gcapes gcapes commented Jan 9, 2017

Hi @castelao
The two scripts look good: they run much more quickly and look to produce the right results within rounding errors.

There are (at least) two outstanding issues:

  1. The plotcount script looks to be missing the functionality to save a figure to a file.
  2. A further script would be required: zipftest.sh to make the summary table.

The bash scripts would then be ready to replace the python scripts if we agree that ascii plots are good enough. They're obviously less realistic than the image files saved by python scripts, but this is a Make lesson rather than a plotting lesson.

castelao added 4 commits Mar 7, 2017
outputfile should be the second argument, moving limit to 3rd input
argument.
Show in the screen or save the plot into the outputfile.
@castelao
Copy link
Author

@castelao castelao commented Mar 7, 2017

Sorry for the delay @gcapes. Do you see any other issue?

@gcapes
Copy link
Contributor

@gcapes gcapes commented Mar 13, 2017

The scripts look good. They'll be a good plan B. Some final touches are needed though.

I think some extra documentation - perhaps in instructor notes as well as comments at the beginning of each script would be useful (given the lesson's commands refer to the python scripts). How does the user run the scripts? Are the scripts intended to be direct replacements for their equivalent python scripts ? Currently they're not quite.

Perhaps some extra thought on standardisation with the python scripts would be useful. For plotcount.sh, we currently have a save-to-file option, and a 'show' option which does the same thing as the python 'ascii' option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.