From a965935c66737cb91dc9ab29c0523678558508a2 Mon Sep 17 00:00:00 2001 From: xuwei06 Date: Wed, 31 Aug 2016 09:25:39 +0000 Subject: [PATCH] Fix quick_start/preprocess.sh for dash 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 --- demo/quick_start/preprocess.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/quick_start/preprocess.sh b/demo/quick_start/preprocess.sh index 49141c69fa..516b655e4b 100755 --- a/demo/quick_start/preprocess.sh +++ b/demo/quick_start/preprocess.sh @@ -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 -- GitLab