Sponsored Content
Top Forums Shell Programming and Scripting Curl/http 503 error with bash script Post 303008602 by kieranfoley on Monday 4th of December 2017 07:23:28 AM
Old 12-04-2017
Hi RudiC,

I'm not sure what you mean? The LINK variable is defined from this line in the script.

Code:
LINK=`cat $TEMP_DIR/test_xml.out | grep link | sed 's/<link>//g;s/<\/link>//g'| awk '{sub(/^[ \t]+/, ""); print}'`

Once the script finishes running (albeit with the 503 service available error) I am able to define the LINK variable from the command line and run the curl GET using $LINK or using the variables contents - either way it works when I run it outside of the script.

If I echo the $LINK variable within the script to get it's contents it is what I expect it to be.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script idea using cUrl -- possible?

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

2. UNIX for Advanced & Expert Users

Issue in Curl to send http POST request with attachment/multipart

Hi, I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command: Code: /usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies

3. Shell Programming and Scripting

bash curl escape & in url

I'm running a curl command in bash, but the & in the middle causes the second half of the line to run in the background, here's what I'm trying to do: lat="37.451" lon="-122.18" url="http://ws.geonames.org/findNearestAddress?lat=$lat&lng=$lon" curl -s "$url" I tried escaping the & with \&,... (4 Replies)
Discussion started by: unclecameron
4 Replies

4. UNIX for Advanced & Expert Users

Syntax issue in curl for getting a file from http site

Hi All I am using curl in my client environment. We need to pull a file from the libraries site. All the files are having perticular URL which can be used to get the files. Only issue is, when we fire that command , it will take to authentication page 1st. once authentication is succed, it will... (1 Reply)
Discussion started by: prabirkumardhar
1 Replies

5. Linux

Apt-get update wont run and gives 503 service unavailable error

Hi, I am running on Ubuntu 12 (precise) 64 bit and came to know that i cannot install any packages using apt-get and aptitude. Linux test01 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux But the same /etc/apt/sources.list file is... (20 Replies)
Discussion started by: prash358
20 Replies

6. Shell Programming and Scripting

Sending awk variables into curl in a bash script

Hello experts! I have a file1 with the following format (yr,day, month, hour,minute): 201201132435 201202141210 201304132030 201410100110 ... What i want to do is to assign variables and then use them in the curl command to download the text of each event from a web page. What I have... (6 Replies)
Discussion started by: phaethon
6 Replies

7. Shell Programming and Scripting

awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log

Hi, I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log. Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)
Discussion started by: Juha
3 Replies

8. Shell Programming and Scripting

Using curl in bash script

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

9. Shell Programming and Scripting

Access a complete flow with CURL + bash shell

Hello Experts , I have an use case which needed your help . I have been using google for 2 days buy couldn`t succed , i believe i can get the help here. Here is my use case to run on bash shell 1. Access an URL -- in script , it will be mentioned as inputURL 2. Once i accessed the URL... (5 Replies)
Discussion started by: radha254
5 Replies

10. Shell Programming and Scripting

Curl , download file with user:pass in bash script

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
SIMGRID_UPDATE_XML(1)					User Contributed Perl Documentation				     SIMGRID_UPDATE_XML(1)

NAME
simgrid_update_xml - updates simgrid XML files to lastest version SYNOPSIS
simgrid_update_xml xml_file DESCRIPTION
simgrid_update_xml updates the simgrid XML file passed as argument. The file is modified in place, without any kind of backup. You may want to save a copy before running the script. In SimGrid XML files, the standard version is indicated in the version attribute of the platform tag. Current version is 3. Here is a list of major changes in each version. Version 0: Used before SimGrid 3.3 Version 1: Introduced in SimGrid 3.3 o The version attribute of platform were added to allow file versionning. o The link bandwidth changed from Mb/s to b/s; and the CPU power were changed from MFlop/s to Flop/s Version 2: Introduced in SimGrid 3.4 o Several tags were renamed: CPU -> HOST NETWORK_LINK -> LINK ROUTE_ELEMENT -> LINK_CTN PLATFORM_DESCRIPTION -> PLATFORM Version 3: Introduced in SimGrid 3.5 (this is the current version) o The AS tag were introduced. Every plaform should now contain an englobing AS tag. o Routes are now symmetric by default. o Several tags were renamed (for sake of XML sanity): LINK:CTN -> LINK_CTN TRACE:CONNECT -> TRACE_CONNECT AUTHORS
The SimGrid team (simgrid-devel@lists.gforge.inria.fr) COPYRIGHT AND LICENSE
Copyright 2006-2011. The SimGrid team. All rights reserved. This program is free software; you may redistribute it and/or modify it under the terms of GNU LGPL (v2.1) license. perl v5.14.2 2012-06-08 SIMGRID_UPDATE_XML(1)
All times are GMT -4. The time now is 04:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy