OSDN Git Service

daily update
[pf3gnuchains/pf3gnuchains3x.git] / expect / fixline1
1 #!expect --
2 # Synopsis: fixline1 newpath < input > output
3 # Author: Don Libes
4
5 # Description: change first line of script to reflect new binary
6 # try to match any of the following first lines
7 #!expect ...
8 #!../expect ...
9 #!expectk ...
10 #!foo/bar/expectk ...
11 #
12 regsub "^#!(.*/)*(.*)" [gets stdin] "#!$argv/\\2" line1
13 puts -nonewline "$line1\n[read stdin]"