summaryrefslogtreecommitdiff
path: root/web/src/cgi.tcl-1.10/fixline1
blob: 1cb579723bcb5fa9db78f609acfb64c9c81af8a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/depot/path/expect --
# Synopsis: fixline1 newpath < input > output
# Author: Don Libes

# Description: change first line of script to reflect new binary
# try to match any of the following first lines
#!expect ...
#!../expect ...
#!expectk ...
#!foo/bar/expectk ...
#
regsub "^#!(.*/)*(.*)" [gets stdin] "#!$argv/\\2" line1
puts -nonewline "$line1\n[read stdin]"