LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-01-2010, 08:55 AM   #1
vikram.lingampalli
LQ Newbie
 
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0
wget is creating file for each execution


Hi,

I am calling a service using http post through wget, the command is successfully executing but for each execution its creating a file and saving variable names n data n it.

I want to execute this command without creation of a file.

Would anyone suggest me what needs to be done in this regard.


My command:


wget --post-data 'var1=99&var2=200' \http://xyz.example.com:5555/invoke/Samples:httpInvoke


For every execution, its creating the files with names:

Samples:httpInvoke1
Samples:httpInvoke2
Samples:httpInvoke3
.
.
.
.
Result of execution:
wget --post-data 'var1=99&var2=200' \http://xyz.example.com:5555/invoke/Samples:httpInvoke
--15:56:45-- http://xyz.example.com:5555/invoke/Samples:httpInvoke
Resolving xyz.example.com... 165.12.10.91
Connecting to yz.example.com|165.12.10.91|:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 276 [text/html]
Saving to: `Samples:httpInvoke'

100%[=======================================>] 276 --.-K/s in 0s

15:56:45 (52.6 MB/s) - `Samples:httpInvoke' saved [276/276]



Regards,
Vikram

Last edited by vikram.lingampalli; 12-01-2010 at 09:01 AM.
 
Old 12-01-2010, 09:03 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,242

Rep: Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475
Quote:
Originally Posted by vikram.lingampalli View Post
Hi,

I am calling a service using http post through wget, the command is successfully executing but for each execution its creating a file and saving variable names n data n it. I want to execute this command without creation of a file. Would anyone suggest me what needs to be done in this regard.

My command:
wget --post-data 'var1=99&var2=200' \http://xyz.example.com:5555/invoke/Samples:httpInvoke

For every execution, its creating the files with names:
Samples:httpInvoke1
Samples:httpInvoke2
Samples:httpInvoke3

Result of execution:
wget --post-data 'var1=99&var2=200' \http://xyz.example.com:5555/invoke/Samples:httpInvoke
--15:56:45-- http://xyz.example.com:5555/invoke/Samples:httpInvoke
Resolving xyz.example.com... 165.12.10.91
Connecting to yz.example.com|165.12.10.91|:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 276 [text/html]
Saving to: `Samples:httpInvoke'

100%[=======================================>] 276 --.-K/s in 0s
15:56:45 (52.6 MB/s) - `Samples:httpInvoke' saved [276/276]
Read the man page on wget. You can try to redirect the output to /dev/null with the -o option, or to a single-file with an append, so you'll get just ONE file for all the posts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File execution denied timyang Linux - Kernel 3 03-19-2007 06:49 AM
file execution ygloo Linux - General 2 11-07-2006 11:25 AM
file execution zaid Linux - General 3 01-18-2006 05:32 AM
file execution zaid Linux - General 1 01-17-2006 07:28 PM
file execution doubt pongsu Linux - General 2 09-25-2003 01:23 PM


All times are GMT -5. The time now is 09:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration