10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I'm trying to run a script which issues rest commands via curl to an endpoint. If I put spaces in fields via something like insomnia, it works, but when I try from an input file, it's failing with a json error.
while IFS=, read mname oname <------ my input file... (10 Replies)
Discussion started by: say170
10 Replies
2. Shell Programming and Scripting
Hello,
My question is about curl command. (ubuntu14.04)
In terminal, I am able to download my mainfile with:
curl -u user1:pass1 http://11.22.33.44/*******
When I convert it into bash script like this:
#!/bin/bash
cd /root/scripts
computer_ip=11.22.33.44
curl -u $1:$2... (8 Replies)
Discussion started by: baris35
8 Replies
3. Shell Programming and Scripting
Hello.
I have pick up a script from internet to track errors from curl command.
#!/bin/bash
#
URL_TO_TEST="http://www.xxxxxx.yyy"
MY_VAR=curl_init("$URL_TO_TEST") ;
curl_setopt($MY_VAR, CURLOPT_HEADER, 1);
curl_setopt($MY_VAR, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($MY_VAR,... (2 Replies)
Discussion started by: jcdole
2 Replies
4. Shell Programming and Scripting
I am trying to use REST API and curl in a bash script to generate a http report. The curl command at the end of the script should generate a html file but instead I get an error "HTTP/1.1 503 Service Unavailable".
This is the script
#!/bin/bash
export... (7 Replies)
Discussion started by: kieranfoley
7 Replies
5. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
6. Shell Programming and Scripting
I'm relatively new to bash scripting and am trying to use awk inside a bash for loop but am having a problem with the variables.
for i in $(seq 30 5 60)
do
# Define variables up and down in AWK
eval $(awk 'BEGIN{ print "up=$((i+1))"}' < /dev/null)
eval $(awk 'BEGIN{ print... (2 Replies)
Discussion started by: lily-anne
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have question about curl - how can I disable caching on server side?
I actually am not on unix/linux but I use win32gnu curl.
I look for some good web- manual and I would like to find some good site which describes how looks headers of various Browsers (Safari, Opera). I have FF and... (0 Replies)
Discussion started by: webhope
0 Replies
8. Shell Programming and Scripting
ok this is probably going to turn out to be something really stupid but i've tried to use the following command in a script but the output is just a blank screen and i have to use Ctrl c to exit it.
awk 'BEGIN {printf "%.2f\n", '${bashArray}'>='$Variable' {print '${bashArray}'}}'
the command... (2 Replies)
Discussion started by: zagreus360
2 Replies
9. Shell Programming and Scripting
I have an alias already in my .bash_profile to download files using cUrl's -o (output to file, user provides the file name) option. I find I'm using it quite a bit, so I wanted to write a script to run "curl -o", taking the necessary inputs - file name and URL from which to download - and then... (3 Replies)
Discussion started by: SilversleevesX
3 Replies
10. Shell Programming and Scripting
Hi all-
I've been fooling with this for a few days, but I'm rather new at this...
I have a bash variable containing a long string of various characters, for instance:
JUNK=this that the other xyz 1234 56 789
I don't know what "xyz" actually is, but I know that:
START=he other
and ... (2 Replies)
Discussion started by: rev66
2 Replies