Project is early, but I'm hoping this will be a proper replacement for xob. https://github.com/francma/wob
		
			
				
	
	
		
			9 lines
		
	
	
		
			161 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			161 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
while read IN
 | 
						|
do
 | 
						|
  [[ ! $IN =~ ^[+-]?[0-9]+$ ]] && IN=0
 | 
						|
  [[ $IN -gt 100 ]] && IN=100
 | 
						|
  [[ $IN -lt 0 ]] && IN=0
 | 
						|
  echo $IN
 | 
						|
done < "${1:-/dev/stdin}"
 |