Sponsored Content
Top Forums Shell Programming and Scripting Blog-Thread: Creating a Shell Wrapper and Runtime Modifier (SWARM) Post 303045960 by sea on Monday 20th of April 2020 04:47:31 AM
Old 04-20-2020
Oh well, was slightly too eager to say pick was done yesterday.... Smilie
It's been a 'long story' frustrating issue as you could read here, and at "False positive grep?"

However, today we *cough* figured the cause of those issues and could fix it.
But, there was something more, because I had missed to redirect swarm.print.border >&2 and because of that, the returned value (as variable) contained empty spaces.

Some small preps for the help menu was all that i could achieve.
Blog-Thread: Creating a Shell Wrapper and Runtime Modifier (SWARM)-swarm22-helpmenujpg

As it is WIP the 'look' (structure, approach) might change.
For today, lets see if I can get this to be more appealing to users.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

korn shell version at runtime?

How can I check what kornshell version I am using at runtime from within a kornshell script? (3 Replies)
Discussion started by: qanda
3 Replies

2. Shell Programming and Scripting

crontab is not creating runtime files which are in script..

this is the output i am getting here.. cp: cannot create /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/eoigwsA_Health_Status_Report.html: Permission denied /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/ /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/GenerateReport.sh:... (6 Replies)
Discussion started by: surekha268
6 Replies

3. Shell Programming and Scripting

Korn Shell Wrapper script

Hi Guys, I am trying write a wrapper script but I don't have any idea. I have 4 different korn shell scripts and all of them needs some parameters from command line (positional parameter). My script cant be interactive because its supposed to be automated. I am confused how can I write a wrapper... (6 Replies)
Discussion started by: pareshan
6 Replies

4. Web Development

Creating a blog site on a local computer

Hello! I would like to create a blog website on a web domain of mine. The blog will be used for publishing economics-lated articles. I tried to use a few open source packages for blog creation (WorldPress, b2evolution, Movable type) which I wanted to test on a local computer before arranging... (5 Replies)
Discussion started by: degoor
5 Replies

5. Programming

creating multiple threads using single thread id

Hi all, Can I create multiple threads using single thread_id like pthread_t thread_id; pthread_create(&thread_id, NULL, &print_xs, NULL); pthread_create(&thread_id, NULL, &print_ys, NULL); pthread_create(&thread_id, NULL, &print_zs, NULL); pthread_join(thread_id, NULL); what... (2 Replies)
Discussion started by: zing_foru
2 Replies

6. Shell Programming and Scripting

Shell Runtime Statistics

Hi, I am trying to capture runtime stats of a shell script (c shell). Are there system variables to call? Or should I create a date variable at the start of the script and at the end of the script? I am trying to capture the time if the script stops or ends with error. Please help. ... (4 Replies)
Discussion started by: CKT_newbie88
4 Replies

7. Shell Programming and Scripting

Wrapper Script in Perl Or shell

Hello, My requirement is based on Oracle where we run a perl script and it asked some questions.I want to write a wrapper which will answer all these questions. How is it possible. Thanks (16 Replies)
Discussion started by: cotton
16 Replies

8. Homework & Coursework Questions

Shell Script average runtime

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Make a bash script that calculates average runtime for the first two scripts you made. The average should be... (17 Replies)
Discussion started by: navlelo
17 Replies

9. Shell Programming and Scripting

Shell Script and Progress Bar or GUI Wrapper

Hi, I have shell script that I am running under Ubuntu as root. Is it possible to hide the command window and show the user some sort of progress /random progress bar / or other form of GUI interaction? On MAC, I have been using Platypus but on Ubuntu I am not sure what to do. (4 Replies)
Discussion started by: naveedanwar4u
4 Replies
HTTP-CONTEXT-OPTIONS(3) 						 1						   HTTP-CONTEXT-OPTIONS(3)

HTTP context options - HTTP context option listing

	Context options for http:// and https:// transports.

	      o $method
		string - GET, POST, or any other HTTP method supported by the remote server.  Defaults to GET.

	      o $header
		string	-  Additional  headers	to  be sent during request. Values in this option will override other values (such as User-agent:,
		Host:, and Authentication:).

	      o $user_agent
		string - Value to send with User-Agent: header. This value will only be used if user-agent is not specified in the header  context
		option above.  By default the user_agent php.ini setting is used.

	      o $content
		string - Additional data to be sent after the headers. Typically used with POST or PUT requests.

	      o $proxy
		string - URI specifying address of proxy server. (e.g.	tcp://proxy.example.com:5100).

	      o $request_fulluri
		boolean  -  When  set  to  TRUE,  the  entire  URI  will  be  used  when  constructing	the  request.  (i.e.  GET http://www.exam-
		ple.com/path/to/file.html HTTP/1.0). While this is a non-standard request format, some proxy  servers  require	it.   Defaults	to
		FALSE.

	      o $follow_location
		integer - Follow Location header redirects. Set to 0 to disable.  Defaults to 1.

	      o $max_redirects
		integer - The max number of redirects to follow. Value 1 or less means that no redirects are followed.	Defaults to 20.

	      o $protocol_version
		float - HTTP protocol version.	Defaults to 1.0.

	      Note

		      PHP prior to 5.3.0 does not implement chunked transfer decoding. If this value is set to 1.1 it is your responsibility to be
		     1.1 compliant.

	      o $timeout
		float - Read timeout in seconds, specified by a float (e.g.  10.5).  By default  the  default_socket_timeout  php.ini  setting	is
		used.

	      o $ignore_errors
		boolean - Fetch the content even on failure status codes.  Defaults to FALSE.

       +--------+---------------------------------------------------+
       |Version |						    |
       |	|						    |
       |	|		     Description		    |
       |	|						    |
       +--------+---------------------------------------------------+
       | 5.3.4	|						    |
       |	|						    |
       |	|	       Added $follow_location.		    |
       |	|						    |
       | 5.3.0	|						    |
       |	|						    |
       |	|  The	$protocol_version supports chunked transfer |
       |	| decoding when set to 1.1.			    |
       |	|						    |
       |5.2.10	|						    |
       |	|						    |
       |	|		Added $ignore_errors.		    |
       |	|						    |
       |5.2.10	|						    |
       |	|						    |
       |	|  The $header can now be  an  numerically  indexed |
       |	| array.					    |
       |	|						    |
       | 5.2.1	|						    |
       |	|						    |
       |	|		   Added $timeout.		    |
       |	|						    |
       | 5.1.0	|						    |
       |	|						    |
       |	|     Added HTTPS proxying through HTTP proxies.    |
       |	|						    |
       | 5.1.0	|						    |
       |	|						    |
       |	|		Added $max_redirects.		    |
       |	|						    |
       | 5.1.0	|						    |
       |	|						    |
       |	|	       Added $protocol_version. 	    |
       |	|						    |
       +--------+---------------------------------------------------+
       Example #1

	      Fetch a page and send POST data

	      <?php

	      $postdata = http_build_query(
		  array(
		      'var1' => 'some content',
		      'var2' => 'doh'
		  )
	      );

	      $opts = array('http' =>
		  array(
		      'method'	=> 'POST',
		      'header'	=> 'Content-type: application/x-www-form-urlencoded',
		      'content' => $postdata
		  )
	      );

	      $context = stream_context_create($opts);

	      $result = file_get_contents('http://example.com/submit.php', false, $context);

	      ?>

       Example #2

	      Ignore redirects but fetch headers and content

	      <?php

	      $url = "http://www.example.org/header.php";

	      $opts = array('http' =>
		  array(
		      'method' => 'GET',
		      'max_redirects' => '0',
		      'ignore_errors' => '1'
		  )
	      );

	      $context = stream_context_create($opts);
	      $stream = fopen($url, 'r', false, $context);

	      // header information as well as meta data
	      // about the stream
	      var_dump(stream_get_meta_data($stream));

	      // actual data at $url
	      var_dump(stream_get_contents($stream));
	      fclose($stream);
	      ?>

       Note

	      Underlying socket stream context options

	       Additional  context  options  may  be  supported  by the underlying transport For http:// streams, refer to context options for the
	      tcp:// transport. For https:// streams, refer to context options for the ssl:// transport.

       Note

	      HTTP status line

	       When this stream wrapper follows a redirect, the wrapper_data returned by stream_get_meta_data(3) might not necessarily contain the
	      HTTP status line that actually applies to the content data at index 0.

	      array (
		'wrapper_data' =>
		array (
		  0 => 'HTTP/1.0 301 Moved Permantenly',
		  1 => 'Cache-Control: no-cache',
		  2 => 'Connection: close',
		  3 => 'Location: http://example.com/foo.jpg',
		  4 => 'HTTP/1.1 200 OK',
		  ...

	       The  first  request  returned  a  301  (permanent redirect), so the stream wrapper automatically followed the redirect to get a 200
	      response (index = 4).

       "http://", "Socket context options", "SSL context options".

PHP Documentation Group 												   HTTP-CONTEXT-OPTIONS(3)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy