diff --git a/_posts/2014-03-16-LeiPipesFilters.md b/_posts/2014-03-16-LeiPipesFilters.md new file mode 100644 index 0000000..d4253ae --- /dev/null +++ b/_posts/2014-03-16-LeiPipesFilters.md @@ -0,0 +1,56 @@ +--- +layout: post +author: lei +title: Lei's Pipes & Filters +--- +# Process + +I used to have some experience with basic shell command before, therefore this exercise was not hard for me to get start with. It gave me a chance to refresh my knowledge about shell command as well. I also found the website http://www.thegeekstuff.com/2010/11/50-linux-commands/ very useful for shell command beginners and learned a lot from it. +___ +## Exercise + +**C1** + +The command `sort -n` compare according to string numerical value, rather than character by character. + +**C2** + +`wc -l < mydata.dat`:`wc -l` doesn't have any command line parameters, it reads from standard input and send the contents of mydata.dat to wc's standard input. +`wc -l mydata.dat`: wc gets a command line parameter telling it to open mydata.dat and get the output result. + +**C3** + +`uniq` is faster when working with large data sets, it removes only adjacent duplicated lines by comparing line by line. We can also use `sort salmon.txt| uniq` to remove all duplicated lines. + +**C4** + +we use "head -5" to get the first 5 lines of the animals.txt: + +``` +2012-11-05,deer +2012-11-05,rabbit +2012-11-05,raccoon +2012-11-06,rabbit +2012-11-06,deer +``` + +Then use "tail -3" to get the last three lines of previous output. + +``` +2012-11-05,raccoon +2012-11-06,rabbit +2012-11-06,deer + +``` + +"sort -r > final.txt" sort the previous outcome and save the result as "final.txt". + +``` +2012-11-06,rabbit +2012-11-06,deer +2012-11-05,raccoon +``` + +**C5** + +`cut -d, -f 2 animals.txt | sort | uniq` diff --git a/_posts/2014-05-03-LeiMeetUp.md b/_posts/2014-05-03-LeiMeetUp.md new file mode 100644 index 0000000..46c80b3 --- /dev/null +++ b/_posts/2014-05-03-LeiMeetUp.md @@ -0,0 +1,18 @@ +--- +layout: post +author: lei +title: Lei's meetup reflection +date: 2014-05-03 +--- +The first link is about a two-day meet up. +https://plus.google.com/106148551333929731569/posts/ZkV3m93yfCj + +The second link is about a one-day meet up. +https://plus.google.com/106148551333929731569/posts/b7C24YN7eWu + +Both of the two meet-ups offer me a great opportunity to learn new knowledge and meet people in an inspiring and efficient way. I was very excited that many of my questions can be solved very quickly in the meeting. When I tried to figure out the solutions to some questions on my own, it took a lot of time to search online, read instructions, and filter information. Sometimes I got stuck for hours on a single question. However, during the meeting, my questions were all solved quickly and I was inspired by opinions from other people's perspectives. + +Another thing I benefit from these meetings is that it allowed me to meet many people. It was nice talking to people who share similar interest with me and exchanging experience and opinions with each other. + +Overall, it was a great experience to participate the meet-ups and made myself exposed to a broader variety of perspectives. +