Created
November 3, 2015 20:14
-
-
Save andybell/652cae137dc7e9f74446 to your computer and use it in GitHub Desktop.
quickly subset point cloud text file
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 | |
# uses grep wildcard to get a subset of a XYZ pointcloud | |
# usage: file_in, file_out, x, y | |
# echo arguments to the shell | |
echo $1 $2 $3 $4 | |
in=$1 | |
out=$2 | |
x=$3 | |
y=$4 | |
# example coord 629483.027229309200 4465266.981443485200 | |
grep $x* $in > tmp | |
grep $y* tmp > $out | |
leng=$(wc -l $out) | |
echo $leng 'matches' | |
rm tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment