File:  [CSRG BSD Unix] / 42BSD / usr.lib / learn / C / L9.1a
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

#print
(Section 1.9 -- read 1.6-1.8 too.)
Write a program that removes trailing blanks
and tabs from each line of input, and deletes
entirely blank lines.  To make your job easier,
you can use the function getline; its source
is in getline.c.
Type ready when you are done.
#once #create Ref
  This  file  contains
some trailing     		
blanks 
and tabs


	
 	 
and some empty lines.
#once #create Ref1
  This  file  contains
some trailing
blanks
and tabs
and some empty lines.
#once cp %s/getline.c .
#user
a.out <Ref >test
#cmp test Ref1
#succeed
No answer yet - sorry.
#log
#next
10 10

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.