Sponsored Content
Top Forums Shell Programming and Scripting Formatting wget request within script Post 302633347 by chihung on Tuesday 1st of May 2012 08:22:27 PM
Old 05-01-2012
Hi Scrutinizer,

I don't think your proposed redirection will work "$s1.txt" will be interpreted by shell before doing the read and this will just resulted in ".txt". Here is my little test.

Code:
$ cat in
x
y
z

$ while read s1
do
  cat /etc/hosts
  uname -a
done < in > "$s1.txt"

$ ls -lart
total 16
-rw-r--r--  1 user user    6 2012-05-02 08:15 in
drwxrwxrwt 14 root root 4096 2012-05-02 08:17 ..
drwxr-xr-x  2 user user 4096 2012-05-02 08:19 .
-rw-r--r--  1 user user  960 2012-05-02 08:19 .txt

This User Gave Thanks to chihung For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Using a request script

I am creating a package(Solaris10 on sparc) that needs user input. As I understand it, I need to use a request script. My problem is that the value I set in my request script is not visible in my postinstall script. Not sure if I am doing it right. Here is an example request script... (4 Replies)
Discussion started by: Tornado
4 Replies

2. Shell Programming and Scripting

Solaris request script

Hi, In the request script I need to read user input and store to variable to use it later in postinstall script. e.g. LOGDIR=/app/log echo "Please type the Log Directory : (current value: $LOGDIR)" read LOGDIR When asked, if the user enters a value the parameter is ok and I... (2 Replies)
Discussion started by: potro
2 Replies

3. Shell Programming and Scripting

help with wget script.

#!/bin/sh # 'clear' for i in $(seq -w 15 37) do echo $i echo The content in Z Z=`wget --dns-timeout=0.001 http://napdweb${i}.eao.abn-iad.ea.com:8000/webcore/test/test.jsp` echo $Z A="Connection timed out." echo The content in A echo $A expr "$A" : '..\(...\)' echo $A done ... (3 Replies)
Discussion started by: veerumahanthi41
3 Replies

4. UNIX for Dummies Questions & Answers

cant make a http get request using wget

Hi all, Im trying to make an http get request to a web service from a linux machine like below and i get ERROR 500 wget http://10.1.21.236:8585/pns.asmx/Sen...&msgBody=werty 25018 $ --19:06:32-- http://10.1.21.236:8585/pns.asmx/Sen...erName=serverA Connecting to 10.1.21.236:8585...... (1 Reply)
Discussion started by: elthox
1 Replies

5. Shell Programming and Scripting

Shell script request

I've a master file which will contain 100 file names, The script should read file name from a master file and format the file as below in AIX. input file Filename This is a test file Output File Filename|This is a test file Thanks in advance for file in $FileList; do (5 Replies)
Discussion started by: udayakumar
5 Replies

6. Shell Programming and Scripting

Request for horizontal formatting code

The input file contains 4 bytes per row 1 2 3 4 5 6 7 8 9 10 11 12 * * * 108 1 2 3 4 5 6 7 8 9 10 11 12 * * * 108 I need to put them in a horizontal manner and this need to repeat after every 108 lines lso the output comes as 1 2 3 4 5 6 7 8 9 10 11 12 ..... 108 1 2... (4 Replies)
Discussion started by: necro98
4 Replies

7. Shell Programming and Scripting

Wget - working in browser but cannot download from wget

Hi, I need to download a zip file from my the below US govt link. https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP I only have wget utility installed on the server. When I use the below command, I am getting error 403... (2 Replies)
Discussion started by: Prasannag87
2 Replies

8. Shell Programming and Scripting

Request per second script

Hello; I'm having about 800 log files and i'm trying to write a script that report the counts of lines per second or "requests per second" in each log file and report the output which includes the timestamp for the highest lines per second count and the log file name and the highest number per... (5 Replies)
Discussion started by: Katkota
5 Replies

9. Ubuntu

Unable to connect only when using wget with 400 bad request error

Hi I have a proxy configured on my ubuntu o.s. running on vmware player, but when trying to wgetDownload Nagios Core from SourceForge.net, I have the following error: failed: Connection refused I have check on the web, they ask me to run sudo ufw status, but the output is enabled, so what... (0 Replies)
Discussion started by: fretagi
0 Replies
GLEVALMESH(3G)															    GLEVALMESH(3G)

NAME
glEvalMesh1, glEvalMesh2 - compute a one- or two-dimensional grid of points or lines C SPECIFICATION
void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ) PARAMETERS
mode In glEvalMesh1, specifies whether to compute a one-dimensional mesh of points or lines. Symbolic constants GL_POINT and GL_LINE are accepted. i1, i2 Specify the first and last integer values for grid domain variable i. C SPECIFICATION
void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) PARAMETERS
mode In glEvalMesh2, specifies whether to compute a two-dimensional mesh of points, lines, or polygons. Symbolic constants GL_POINT, GL_LINE, and GL_FILL are accepted. i1, i2 Specify the first and last integer values for grid domain variable i. j1, j2 Specify the first and last integer values for grid domain variable j. DESCRIPTION
glMapGrid and glEvalMesh are used in tandem to efficiently generate and evaluate a series of evenly-spaced map domain values. glEvalMesh steps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified by glMap1 and glMap2. mode determines whether the resulting vertices are connected as points, lines, or filled polygons. In the one-dimensional case, glEvalMesh1, the mesh is generated as if the following code fragment were executed: glBegin( type ); for ( i = i1; i <= i2; i += 1 ) glEvalCoord1( i dot DELTA u + u1 ); glEnd(); where DELTA(u) = (u2 - u1 ) / n and n, u1, and u2 are the arguments to the most recent glMapGrid1 command. type is GL_POINTS if mode is GL_POINT, or GL_LINES if mode is GL_LINE. The one absolute numeric requirement is that if i = n, then the value computed from i dot DELTA(u) + u1 is exactly u2. In the two-dimensional case, glEvalMesh2, let DELTA(u) = ( u2 - u1 ) / n DELTA(v) = ( v2 - v1 ) / m, where n, u1, u2, m, v1, and v2 are the arguments to the most recent glMapGrid2 command. Then, if mode is GL_FILL, the glEvalMesh2 command is equivalent to: for ( j = j1; j < j2; j += 1 ) { glBegin( GL_QUAD_STRIP ); for ( i = i1; i <= i2; i += 1 ) { glEvalCoord2( i dot DELTA(u) + u1, j dot DELTA(v) + v1 ); glEvalCoord2( i dot DELTA(u) + u1, (j+1) dot DELTA(v) + v1 ); } glEnd(); } If mode is GL_LINE, then a call to glEvalMesh2 is equivalent to: for ( j = j1; j <= j2; j += 1 ) { glBegin( GL_LINE_STRIP ); for ( i = i1; i <= i2; i += 1 ) glEvalCoord2( i dot DELTA(u) + u1, j dot DELTA(v) + v1 ); glEnd(); } for ( i = i1; i <= i2; i += 1 ) { glBegin( GL_LINE_STRIP ); for ( j = j1; j <= j1; j += 1 ) glEvalCoord2( i dot DELTA(u) + u1, j dot v + v1 ); glEnd(); } And finally, if mode is GL_POINT, then a call to glEvalMesh2 is equivalent to: glBegin( GL_POINTS ); for ( j = j1; j <= j2; j += 1 ) for ( i = i1; i <= i2; i += 1 ) glEvalCoord2( i dot u + u1, j dot DELTA(v) + v1 ); glEnd(); In all three cases, the only absolute numeric requirements are that if i = n, then the value computed from i dot DELTA(u) + u1 is exactly u2, and if j = m, then the value computed from j dot DELTA(v) + v1 is exactly v2. ERRORS
GL_INVALID_ENUM is generated if mode is not an accepted value. GL_INVALID_OPERATION is generated if glEvalMesh is executed between the execution of glBegin and the corresponding execution of glEnd. ASSOCIATED GETS
glGet with argument GL_MAP1_GRID_DOMAIN glGet with argument GL_MAP2_GRID_DOMAIN glGet with argument GL_MAP1_GRID_SEGMENTS glGet with argument GL_MAP2_GRID_SEGMENTS SEE ALSO
glBegin, glEvalCoord, glEvalPoint, glMap1, glMap2, glMapGrid GLEVALMESH(3G)
All times are GMT -4. The time now is 01:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy