Presentation is loading. Please wait.

Presentation is loading. Please wait.

LING 408/508: Programming for Linguists Online Lecture 7 September 16 th.

Similar presentations


Presentation on theme: "LING 408/508: Programming for Linguists Online Lecture 7 September 16 th."— Presentation transcript:

1 LING 408/508: Programming for Linguists Online Lecture 7 September 16 th

2 Today's Topics Just two exercises for you to practice your Bash shell script writing skills! Don't submit as homework

3 Ungraded Exercise Changing the line spacing of a text file 1.Write a script that reads each line of a file, then writes the line back out, but with an extra blank line following. This has the effect of double-spacing the file. Note: include if possible a check to see whether the script gets the necessary command-line argument (a filename), and whether the specified file exists. 2.Next, write a script to echo all lines of a file except for blank lines. (Exercise adapted from http://tldp.org/LDP/abs/html/writingscripts.html)

4 Ungraded Exercise Changing the line spacing of a text file 2.Next, write a script to echo all lines of a file except for blank lines. (Exercise adapted from http://tldp.org/LDP/abs/html/writingscripts.html)


Download ppt "LING 408/508: Programming for Linguists Online Lecture 7 September 16 th."

Similar presentations


Ads by Google