Created
September 14, 2018 11:37
-
-
Save macoj/b01d2d71be9dc3a7893308bd3f6b612e to your computer and use it in GitHub Desktop.
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