Advanced Bash Scripting (ABS), Mendel Cooper
Ch 10
Example 10-1. Inserting a blank line between paragraphs in a text file
http://www.tldp.org/LDP/abs/html/str...ipulation.html
I run this program and it just hangs. Before I ran the program I executed:
Code:
$ sudo chmod +x e10-01BlankLineInsertB.sh
[sudo] password for a:
$ bash -xv
$ ./e10-01BlankLineInsertB.sh text.txt
./e10-01BlankLineInsertB.sh text.txt
+ ./e10-01BlankLineInsertB.sh text.txt
(program hangs here)
^C
$ ls -l e10-01BlankLineInsert* text*
ls -l e10-01BlankLineInsert* text*
+ ls -F --color=auto -l e10-01BlankLineInsertB.sh e10-01BlankLineInsert.sh text.txt text.txt.bak
-rwxrwxr-x 1 a a 1074 5月 1 11:06 e10-01BlankLineInsertB.sh*
-rwxrwxr-x 1 a a 1092 5月 1 00:02 e10-01BlankLineInsert.sh*
-rw-rw-r-- 1 a a 5402 5月 1 10:34 text.txt
-rw-rw-r-- 1 a a 5401 4月 30 23:50 text.txt.bak
The text.txt file is attached.
Is there anything I can do to get it to work?