Why doesn't it work? The PHP is OK. It runs client.sh with a couple parameters. If the problem is with client.sh then you'll need to paste that rather than the PHP code.
You parent process call subprocess
On the shell subprocess you can handle arguments using variable 1, 2, 3 ...
So your subprocess script should be something like:
But command line is parsed using IFS = white space, so if your variable hallo include whitespaces, shell will split your value. If you like to keep whitespaces in your value, then you need to tell it: round the string using ' characters, you'll tell that "this is the string".
So your php include it:
It's also little risk to use sh. I'll tell exactly which shell I like to use: bash, ksh, dash, ... Usually sh is linked to the one of those, but on the older *nix it'll be Bourne Shell.
Example "I like to use bash to run my script":
Or you can setup in your script (=correct method) which shell it need/has tested to use
And you setup execution privilege for script:
Then your php call "program", not script:
And shell script will use that interpreter which you have set in the script.
Good afternoon, i need your help pls
I want to write a new script that start running as soon as a previus one finish via Autosys (it should be implemented via Autosys too to validate the exsitance and the successful transfered file to a remote server
Whenever the file arrives to the path... (2 Replies)
Hello,
Would you suggest me a shell program that would launch the given url and if there is login we have enter the credentials.
If the credentials are correct it would be redirected to home page of that url, the program will check if there are any PDF'S found automatically the PDF'S have... (5 Replies)
Hello,
I'm requesting the shell program to compare 2 .csv files which will have large data.
Can any one help me with this linux shell program
Thanks in advance.
Thanks and regards
Ramanjaneya. K (1 Reply)
hello,
I have implemented this command :
tshark -eth0 -T fiels -e frame.time et sip.Request-Line -z sip,stat > test2.txt
the result of this command : test.txt:
Aug 27, 2013 23:06:47.334270000 INVITE
Aug 27, 2013 23:06:47.335045000 SIP/2.0 401 Unauthorized
Aug 27, 2013... (1 Reply)
Hi I m running a php file in Unix shell
it says php cpmmnad not found
bash-3.2$ cat echo.php
<? php
echo"heelo world"
>?
bash-3.2$ php echo.php
bash: php: command not found
actually I want to change certain thing a in a website using php script so I m beginner and trying... (6 Replies)
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)
Hi All,
I want to call a concurrent request set from a shell script. I am getting the syntax error "syntax error at line 417 : `(' unexpected" in the below script.
v_request_id=fnd_request.submit_request(application => 'APPL_SHORT_NAME'
,program => 'PROGRAM_SHORT_NAME'
... (4 Replies)
Hi,
I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram
I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Hi,
I got a script which sends the Email to the user based on certain variables received from Tivoli Server Monitoring 6.1.
Now to keep track of the mails I have wrote a stored procedure in DB2 as we use DB2 UDB as back end which take the variables that were used to send the mail and store it... (3 Replies)