Sponsored Content
Full Discussion: put script into file
Top Forums UNIX for Dummies Questions & Answers put script into file Post 302574900 by me. on Friday 18th of November 2011 03:05:55 PM
Old 11-18-2011
great, thanks
that is what I was thinking about the " { . .. . . . . } exit 0 "
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (1 Reply)
Discussion started by: shilendrajadon
1 Replies

2. Shell Programming and Scripting

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (2 Replies)
Discussion started by: shilendrajadon
2 Replies

3. UNIX for Dummies Questions & Answers

Where should I put the script?

Hi Guys, I'm a new to the UNIX. Let say I have a 1 simple script to stop and start vnc service. I want to use that script for support because my network connection to my client side is not stable and every time I have to use a long command to restart vnc. Where should I put that script?... (3 Replies)
Discussion started by: akuslive
3 Replies

4. Shell Programming and Scripting

ftp put in shell script -- whole file doesn't upload

Hi I'm having some trouble with a bash shell script that I'm writing. In the script, I'm trying to upload a file to a backup repository using ftp, but the whole file doesn't get uploaded. This is the file's properties at the start (I've highlighted the file size in red): -rw-r--r-- 1 root... (2 Replies)
Discussion started by: Viola
2 Replies

5. Shell Programming and Scripting

Could I put this into a case script instead?

Hi guys, I have a script which clears down a range of directories, however it can take a while to run. Is there a way I can simplify the below, perhaps adding it into a case statement? client_directories=/usr/local/production/cleanup/bin/client_cleanups/client_directories.txt # clear down... (2 Replies)
Discussion started by: JayC89
2 Replies

6. Shell Programming and Scripting

how to put data using shell script to a excel file

Hi, Can any one tell me how to put data using shell script to a excel file from text file to other columns of excel file,leaving first column unaffected i.e it should not overwrite data in first column. Say my text file data is: 15-dec-2008 15-dec-2009 16-dec-2008 16-dec-2009 say my first... (1 Reply)
Discussion started by: siri_886
1 Replies

7. Shell Programming and Scripting

Script to put block comment after finding regex in xml file

hi, i need my bash script to find regex in xml file.. and comment 2 lines before and after the line that contains regex.. can't use # needs to be <!-- at the beginning and --> and the end of the comment. so eg.. first block <filter> <filter-name>MyRegEx</filter-name> ... (11 Replies)
Discussion started by: Poki
11 Replies

8. UNIX for Advanced & Expert Users

put data in excel file using shell script

Hi. I wish to add data in a specific excel file on daily basis.However the currect dat's data should always come on top i.e for example should always occupy cell A7,B7,C7 .. and the data of day before which was earlier on 7th row of each coloumn should move to 8th row..data on 8th row should... (1 Reply)
Discussion started by: kanus
1 Replies

9. Shell Programming and Scripting

i writing a unix script but i want to out put a file and append on it.

i have an existing script that is used to send an e-mail containing the alrams that appear on the server. But i need to create a daily log file containing all the alarms that was send that day. i tired to add at the and of the script a command, echo command but for some reason the file was... (1 Reply)
Discussion started by: ashraf_victory
1 Replies

10. Shell Programming and Scripting

Shell script to put delimiter for a no delimiter variable length text file

Hi, I have a No Delimiter variable length text file with following schema - Column Name Data length Firstname 5 Lastname 5 age 3 phoneno1 10 phoneno2 10 phoneno3 10 sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies
WIN32_CREATE_SERVICE(3) 						 1						   WIN32_CREATE_SERVICE(3)

win32_create_service - Creates a new service entry in the SCM database

SYNOPSIS
mixed win32_create_service (array $details, [string $machine]) DESCRIPTION
PARAMETERS
o $details - An array of service details: o $service - The short name of the service. This is the name that you will use to control the service using the net command. The ser- vice must be unique (no two services can share the same name), and, ideally, should avoid having spaces in the name. o $display -The display name of the service. This is the name that you will see in the Services Applet. o $description -The long description of the service. This is the description that you will see in the Services Applet. o $user - The name of the user account under which you want the service to run. If omitted, the service will run as the LocalSystem account. If the username is specified, you must also provide a password. o $password - The password that corresponds to the $user. o $path - The full path to the executable module that will be launched when the service is started. If omitted, the path to the current PHP process will be used. o $params - Command line parameters to pass to the service when it starts. If you want to run a PHP script as the service, then the first parameter should be the full path to the PHP script that you intend to run. If the script name or path contains spa- ces, then wrap the full path to the PHP script with ". o $load_order - Controls the load_order. This is not yet fully supported. o $svc_type - Sets the service type. If omitted, the default value is WIN32_SERVICE_WIN32_OWN_PROCESS. Don't change this unless you know what you're doing. o $start_type - Specifies how the service should be started. The default is WIN32_SERVICE_AUTO_START which means the service will be launched when the machine starts up. o $error_control - Informs the SCM what it should do when it detects a problem with the service. The default is WIN32_SERVER_ERROR_IGNORE. Changing this value is not yet fully supported. o $delayed_start - If $delayed_start is set to TRUE, then this will inform the SCM that this service should be started after other auto- start services are started plus a short delay. Any service can be marked as a delayed auto-start service; however, this setting has no effect unless the service's $start_type is WIN32_SERVICE_AUTO_START. This setting is only applicable on Windows Vista and Windows Server 2008 or greater. o $base_priority - To reduce the impact on processor utilisation, it may be necessary to set a base priority lower than normal. The $base_priority can be set to one of the constants define in Win32 Base Priority Classes. o $machine - The optional machine name on which you want to create a service. If omitted, it will use the local machine. RETURN VALUES
Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code on failure. EXAMPLES
Example #1 A win32_create_service(3) example Create a service with the short name 'dummyphp'. <?php $x = win32_create_service(array( 'service' => 'dummyphp', # the name of your service 'display' => 'sample dummy PHP service', # short description 'description' => 'This is a dummy Windows service created using PHP.', # long description 'params' => '"' . __FILE__ . '" run', # path to the script and parameters )); debug_zval_dump($x); ?> SEE ALSO
win32_delete_service(3), Win32 Base Priority Classes, Win32 Error Codes. PHP Documentation Group WIN32_CREATE_SERVICE(3)
All times are GMT -4. The time now is 02:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy