mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	base-files: ipcalc.sh: use shebang to invoke awk
There's hardly an shell logic in ipcalc.sh and a $* that would garble parameter positions. Move the awk invokation to the shebang. A rename from "ipcalc.sh" to "ipcalc" is desirable but could prove tricky with packages in other repositories depending on the filename. Signed-off-by: Leon M. George <leon@georgemail.eu>
This commit is contained in:
		
							parent
							
								
									a40a96e54b
								
							
						
					
					
						commit
						6ce9f42b98
					
				@ -1,6 +1,5 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
#!/usr/bin/awk -f
 | 
			
		||||
 | 
			
		||||
awk -f - $* <<EOF
 | 
			
		||||
function bitcount(c) {
 | 
			
		||||
	c=and(rshift(c, 1),0x55555555)+and(c,0x55555555)
 | 
			
		||||
	c=and(rshift(c, 2),0x33333333)+and(c,0x33333333)
 | 
			
		||||
@ -82,4 +81,3 @@ BEGIN {
 | 
			
		||||
	print "START="int2ip(start)
 | 
			
		||||
	print "END="int2ip(end)
 | 
			
		||||
}
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user