Skip to content

Commit b8ab2f0

Browse files
committed
grep for jekyll serve specifically since that is the command that is running.
- add an alternative one-liner to find and kill these processes.
1 parent 6097b52 commit b8ab2f0

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

_episodes/01-How-to-make-a-lesson.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,18 @@ You may need to reload the web site to see your changes.
147147

148148

149149
~~~
150-
ps -ef | grep jekyll
150+
ps -ef | grep 'jekyll serve'
151151
~~~
152152
{: .language-bash}
153+
You can identify the process number from the second column that is printed and kill that process.
154+
Alternatively this can be achieved with a one line command:
155+
~~~
156+
ps -ef | grep '[j]ekyll serve' | awk '{print $2}'
157+
~~~
158+
{: .language-bash}
159+
The `awk` command grabs the second column, the PID. The `[j]` is a trick to stop it from also passing the `grep` process to kill also.
160+
161+
153162

154163
### Publishing your draft site to `<yourname>.github.io/<yoursite>`
155164

0 commit comments

Comments
 (0)