Skip to content

Commit

Permalink
Hotfixed syntax in make.sh and fixed rng in select.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nmke-de committed Dec 24, 2021
1 parent 9dd4a84 commit 543cef6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ap_state="normal"
while [ $# -gt 0 ]; do
echo $1
[ $ap_state = "get_outfile" ] && outfile=$1 && ap_state="normal"
[ $1 = "-o" ] && [$ap_state = "normal" ] && ap_state="get_outfile"
[ $1 = "-o" ] && [ $ap_state = "normal" ] && ap_state="get_outfile"
[ $1 = "-h" ] && echo "Syntax: $0 [--help|-h|-o Outputfile] Inputfile" && exit 0
[ $1 = "--help" ] && echo "Syntax: $0 [--help|-h|-o Outputfile] Inputfile" && exit 0
[ $1 != "-o" ] && [ $ap_state = "normal" ] && infile=$1
Expand Down
4 changes: 2 additions & 2 deletions select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ get_data () {
sed '1,/^#EOF$/d' < "$SELF" | tar xz -O "$1"
}

#lines=$(D $(get_data elb.tsv | wc -l | cut -d' ' -f1))
get_data elb.tsv | awk "BEGIN{FS=\"\\t\"; r=int(rand()*$lines)+1} r==NR{print \$1 \" \" \$4 \":\" \$5 \"\\t\" \$6}"
lines=$(get_data elb.tsv | wc -l | cut -d' ' -f1)
get_data elb.tsv | awk "BEGIN{FS=\"\\t\"; srand();r=int(rand()*$lines)+1} r==NR{print \$1 \" \" \$4 \":\" \$5 \"\\t\" \$6}"

0 comments on commit 543cef6

Please sign in to comment.