--- /dev/null
+/*
+ * ------------------------------------------------------------------------
+ * File Name: 1.1.go
+ * Author: Zhao Yanbai
+ * 2017-06-05 23:10:22 Monday CST
+ * Description: none
+ * ------------------------------------------------------------------------
+ */
+package main
+import (
+ "os"
+ "fmt"
+)
+
+func main() {
+ defer fmt.Println("Program Exited...")
+
+ s, sep := "", " "
+ for i, arg := range os.Args[:] {
+ if i > 0 {
+ s += sep
+ }
+
+ s += arg
+ }
+
+ fmt.Println(s)
+}
--- /dev/null
+/*
+ * ------------------------------------------------------------------------
+ * File Name: 1.2.go
+ * Author: Zhao Yanbai
+ * 2017-06-05 23:13:55 Monday CST
+ * Description: none
+ * ------------------------------------------------------------------------
+ */
+package main
+import (
+ "os"
+ "fmt"
+)
+
+func main() {
+ defer fmt.Println("Program Exited...")
+ for i, v := range(os.Args) {
+ fmt.Printf("%10d %s\n", i, v)
+ }
+}
--- /dev/null
+/*
+ * ------------------------------------------------------------------------
+ * File Name: 1.3.go
+ * Author: Zhao Yanbai
+ * 2017-06-05 23:16:25 Monday CST
+ * Description: none
+ * ------------------------------------------------------------------------
+ */
+package main
+import (
+ "fmt"
+)
+
+func main() {
+ defer fmt.Println("Program Exited...")
+
+
+}
--- /dev/null
+/*
+ * ------------------------------------------------------------------------
+ * File Name: 1.4.go
+ * Author: Zhao Yanbai
+ * 2017-06-05 23:24:57 Monday CST
+ * Description: none
+ * ------------------------------------------------------------------------
+ */
+package main
+import (
+ "os"
+ "fmt"
+ "log"
+ "bufio"
+)
+
+
+
+
+func main() {
+ defer fmt.Println("Program Exited...")
+
+ files := os.Args[1:]
+
+ if len(files) == 0 {
+ countLines(os.Stdin)
+ } else {
+ for _, file := range(files) {
+ fmt.Println("Counting %s\n", file)
+ f, err := os.Open(file)
+ defer f.Close()
+ if err != nil {
+ log.Fatal(err)
+ }
+ countLines(f)
+ }
+ }
+}
+
+
+func countLines(f *os.File) {
+ var counts = make(map[string]int)
+ scanner := bufio.NewScanner(f)
+ for scanner.Scan() {
+ counts[scanner.Text()]++
+ }
+
+
+ for k, v := range(counts) {
+ fmt.Printf("%s:%d\n", k, v)
+ }
+}