Quantcast
Channel: curl command not executing via shell script in bash - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

curl command not executing via shell script in bash

$
0
0

I'm learning shell scripting! For the same I've tried downloading the TCGA genome data using curl on ubuntu (Ubuntu 16.04.3 LTS) terminal.

sh. content

#!/bin/shecho /0c8a6022-b770-4a83-bac3-b1526a16c89a/;token=$(<gdc-user-token.2018-06-26T14_36_13.548Z.txt)export ec=18; while [ $ec -ne 0 ]; do curl -C - -H "X-Auth-Token: $token"'https://api.gdc.cancer.gov/slicing/view/0c8a6022-b770-4a83-bac3-b1526a16c89a?region=chr9:131270948-131270948'> STAD/chr9:131270948-131270948_C440.TCGA-BR-6453-01A-11D-1800-08.3_gdc_realn.bam; export ec=$?;done

If I run the sh script, downloaded file is empty, without any error message.

But if the run the command directly then it is working fine.

I will appreciate if anyone let me know the mistake I am doing in the script.


Viewing all articles
Browse latest Browse all 2

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>