home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.hackers
- Path: sparky!uunet!stan!imp
- From: imp@solbourne.com (Warner Losh)
- Subject: Re: tftpboot file creation
- Message-ID: <BuKrn1.LKD@solbourne.com>
- Organization: Solbourne, User Interface Group
- References: <1992Sep13.155507.17974@sol.ctr.columbia.edu> <RENS.92Sep13224403@lorax.shearson.com>
- Date: Mon, 14 Sep 1992 15:42:37 GMT
- Approved: yes
- Lines: 14
-
- In article <RENS.92Sep13224403@lorax.shearson.com> rens@shearson.com writes:
- >hex=`echo $1 | awk -F. '{printf("%x%x%x%x\n",$1,$2,$3,$4)}' | tr a-f A-F`
-
- if $1 = 1.2.3.4, then you get the wrong answer by doing it this way.
- You need to have "%02x" for each of the %x's to get the right answer.
-
- ObHack:
- Using cpp to simulate templates when I can't use templates for
- the problem at hand. Eliminated 2100 of 7500 lines of code this way.
-
- Warner
- --
- Warner Losh imp@Solbourne.COM
- I've almost finished my brute force solution to subtlety.
-