sed
经常需要将windows下的脚本里面的换行符转变成linux下的换行符,使用下面指令:
sed -e 's/.$//' %s > tmp;cat tmp > %s
--train_file ../proc/data/ace-event/processed-data/default-settings/json/train_convert.json --dev_file ../proc/data/ace-event/processed-data/default-settings/json/dev_convert.json --test_file ../proc/data/ace-event/processed-data/default-settings/json/test_convert.json --train_batch_size 8 --eval_batch_size 8 --eval_per_epoch 20 --num_train_epochs 6 --output_dir trigger_qa_output --model_dir trigger_qa_output/epoch0-step0 --learning_rate 4e-5 --nth_query 5 --warmup_proportion 0.1 --do_train --do_eval --do_lower_case --model bert-base-uncased --gpu_ids 6,7,8,9
sed -e ‘s/.$//‘ ./code/script_trigger_qa.sh > tmp;cat tmp > ./code/script_trigger_qa.sh
sed -e ‘s/.$//‘ ./code/script_args_qa_thresh.sh > tmp;cat tmp > ./code/script_args_qa_thresh.sh;rm tmp