OK, well...that at least clarifies precisely what is going wrong, if not why. The fact it's saying:
Couldn't resolve host 'application'
can only mean that it's interpreting the 'application/json"' bit of your input as the URL to connect to (i.e., it thinks the server is quite literally 'application', and the URL you're trying to retrieve is 'application/json').
That doesn't get us directly closer to explaining why this works just fine at the command line, though.
Next questions, then:
Is the curl in your own PATH at the shell prompt the same /usr/bin/curl as the script is trying to execute (i.e. check the output of which curl?
Is the shell the script is running as the same as your logon shell (i.e. does the shebang #!/ line tell the script to run as the same shell as the one you're using at your own command prompt ?
Hopefully the answers to these questions will lead us a bit closer to what's going on here.
---------- Post updated at 07:56 PM ---------- Previous update was at 07:45 PM ----------
Hi,
Right, I can actually replicate this. TL;DR - it's the quotes.
So, with my script reading thusly:
I got (amongst other things) the following in the output:
If I change the script to this:
I get this:
(which obviously I'd expect to, since I have neither data to post nor anything to post it to).
Try changing the formatting of your quotes and see how you get on, maybe ?
Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts..
I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Hi there, I'm pretty new to scripting and wondering if anyone had any idea's, scripts or snippets on how I can do the following.
I basically want a shell script that will look at all the files in a directory and find all the names and addresses in them then output them to the screen nicely... (12 Replies)
Hello:
NOOB here. I attempted to use smit mkcd. Failed on first attempt, not enough space. 2nd attempt tried to place iso on /usr, not enough space there. Cleanup ran for about 5 minutes after aborting. Now AIX won't boot. LCD display on 7029-6E3 says: 0517 MOUNT /USR. Attempted to boot from CD... (11 Replies)
Hi,
Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab?
Right now this is what I have in my .bashrc:
bind "set show-all-if-ambiguous on"
bind \\C-o:menu-complete
This allows... (0 Replies)
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)
Hi all, I now have project in UNIX Solaris and I want to have some new ideas to execute it, so I hope you help me finding new ideas in scripting or some infrastructure .bye (1 Reply)
Hello,
I have a very old hp rp2450 running 11i2 that I had to power off. When turning it back on it hangs with the following message. Would booting into SUM get me any further? I've never used SUM, so I'm asking before I go down that rabbit hole.
Thanks for the help.
#
## extra content... (1 Reply)
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... (1 Reply)
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)
Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)