Skip to content

Commit

Permalink
Merge pull request #228 from keszybz/gh-pages
Browse files Browse the repository at this point in the history
05-cmdline: do not link to a page about kill
  • Loading branch information
chendaniely committed Sep 21, 2016
2 parents 1775a82 + 7f3e2d8 commit 11bdcf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions episodes/05-cmdline.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ Rscript count-stdin.R data/small-01.csv
i.e., to forget the `<` character that redirect the file to standard input.
In this case, there's nothing in standard input, so the program waits at the start of the loop for someone to type something on the keyboard.
We can type some input, but R keeps running because it doesn't know when the standard input has ended.
If you ran this, you can pause R by typing `ctrl`+`z` (technically it is still paused in the background; if you want to fully kill the process follow these [instructions][ps-kill]).
If you ran this, you can pause R by typing `ctrl`+`z` (technically it is still paused in the background; if you want to fully kill the process type `kill %`; see [bash manual][bash-jobs] for more information)).

[ps-kill]: http://linux.about.com/library/cmd/blcmdl_kill.htm
[bash-jobs]: https://www.gnu.org/software/bash/manual/bash.html#Job-Control-Basics

We now need to rewrite the program so that it loads data from `file("stdin")` if no filenames are provided.
Luckily, `read.csv` can handle either a filename or an open file as its first parameter, so we don't actually need to change `process`.
Expand Down
4 changes: 2 additions & 2 deletions episodes/05-cmdline.md
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,9 @@ Rscript count-stdin.R data/small-01.csv
i.e., to forget the `<` character that redirect the file to standard input.
In this case, there's nothing in standard input, so the program waits at the start of the loop for someone to type something on the keyboard.
We can type some input, but R keeps running because it doesn't know when the standard input has ended.
If you ran this, you can pause R by typing `ctrl`+`z` (technically it is still paused in the background; if you want to fully kill the process follow these [instructions][ps-kill]).
If you ran this, you can pause R by typing `ctrl`+`z` (technically it is still paused in the background; if you want to fully kill the process type `kill %`; see [bash manual][bash-jobs] for more information)).

[ps-kill]: http://linux.about.com/library/cmd/blcmdl_kill.htm
[bash-jobs]: https://www.gnu.org/software/bash/manual/bash.html#Job-Control-Basics

We now need to rewrite the program so that it loads data from `file("stdin")` if no filenames are provided.
Luckily, `read.csv` can handle either a filename or an open file as its first parameter, so we don't actually need to change `process`.
Expand Down

0 comments on commit 11bdcf7

Please sign in to comment.