Filter some data based on some criteria with awk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bb0=$1 | |
bb1=$2 | |
bb2=$3 | |
bb3=$4 | |
cat data.dat | awk -F '|' -v bb0="$bb0" -v bb1="$bb1" -v bb2="$bb2" -v bb3="$bb3" '$2 > bb0 && $2 < bb1 && $3 > bb2 && $3 < bb3 {print $0}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment