Skip to content

Commit

Permalink
Fix quick_start/preprocess.sh for dash
Browse files Browse the repository at this point in the history
On Ubuntu, /bin/sh is dash. Change to POSIX syntax

ISSUE=4607487

git-svn-id: https://svn.baidu.com/idl/trunk/paddle@1455 1ad973e4-5ce8-4261-8a94-b56d1f490c56
  • Loading branch information
xuwei06 committed Aug 31, 2016
1 parent 039180a commit a965935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/quick_start/preprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ cat pos_*|sort|uniq|shuf> pos.shuffed
cat neg_*|sort|uniq|shuf> neg.shuffed

min_len=`sed -n '$=' neg.shuffed`
((test_num=$min_len/10))
test_num=$((min_len/10))
if [ $test_num -gt 12500 ];then
test_num=12500
fi
((train_num=$min_len-$test_num))
train_num=((min_len-test_num))

head -n$train_num pos.shuffed >train.pos
head -n$train_num neg.shuffed >train.neg
Expand Down

0 comments on commit a965935

Please sign in to comment.