I'm a newbie to the Unix world Help!
I have to maintain a host of Sybase database servers sitting on Unix Sun Solaris 8...I've been tasked with finding/creating a way to auto start/stop Unix via unix commands, specifically when the Unix servers need to be restarted we want Sybase to start... (2 Replies)
Hi,
I have a shell script t1.sh. on my solaris box.
So, what are the steps required to make this script run as a Service, when the system re-starts. (for ex:- at run level 3).
I know that I should use the rc.d folders. But I don't know the exact steps.
Kindly explain,
Thanks in... (3 Replies)
I'm wondering how I should make a script that can start, stop, and restart another script.
What I need to be able to do, is start and stop a perl script from the command line. The easiest way of doing this seems to be to have another script, starting and stopping the other script. I have BASH,... (7 Replies)
Hi All,
I would like to develop a shell script for stop & start an application server (1-4) on Solaris box. Here are the user requirements for this task.
1. User will input the option which server they wish to stop.
2. Will clear cache files from specific location.
3. ... (1 Reply)
So, Just for practice, I wrote a simple fibonacci sequence script in bash.
(03:08:02\$ cat fib
#!/usr/bin/bash
ret ()
{
echo -ne "\n"
sleep .5
}
a=1
b=2
echo -n $a #1 A
ret
echo -n $b #2 B
ret (8 Replies)
I have Big brother script, which start/stop Big Brother processes. Something got change on server and now I am not able to start/stop it. There is no change in script, as I compared it from other server. This service is being managed by bb user (group is also bb).
root@tsazdq04:/#... (6 Replies)
Hello All,
I am completely new to shell scripting. I had to write a script that starts and stop the queue manager in Websphere MQ. We are on Linux 64-bit patform.
The script should stop the queue manager and all the processes related to websphere MQ. It should be a clean stop. Once the queue... (3 Replies)
Hi,
I need to create a shell script for automated server patching, with the following scenario:
I have two Linux servers Primary and secondary.
Server patching should start on Primary 1st and then secondary.
1st check both servers are up and running.
Then stop primary and patching will... (1 Reply)
Discussion started by: rcroyal88
1 Replies
LEARN ABOUT PHP
fprintf
FPRINTF(3) 1 FPRINTF(3)fprintf - Write a formatted string to a streamSYNOPSIS
int fprintf (resource $handle, string $format, [mixed $args], [mixed $...])
DESCRIPTION
Write a string produced according to $format to the stream resource specified by $handle.
PARAMETERS
o $handle
-A file system pointer resource that is typically created using fopen(3).
o $format
- See sprintf(3) for a description of $format.
o $args
-
o $...
-
RETURN VALUES
Returns the length of the string written.
EXAMPLES
Example #1
fprintf(3): zero-padded integers
<?php
if (!($fp = fopen('date.txt', 'w'))) {
return;
}
fprintf($fp, "%04d-%02d-%02d", $year, $month, $day);
// will write the formatted ISO date to date.txt
?>
Example #2
fprintf(3): formatting currency
<?php
if (!($fp = fopen('currency.txt', 'w'))) {
return;
}
$money1 = 68.75;
$money2 = 54.35;
$money = $money1 + $money2;
// echo $money will output "123.1";
$len = fprintf($fp, '%01.2f', $money);
// will write "123.10" to currency.txt
echo "wrote $len bytes to currency.txt";
// use the return value of fprintf to determine how many bytes we wrote
?>
SEE ALSO printf(3), sprintf(3), sscanf(3), fscanf(3), vsprintf(3), number_format(3).
PHP Documentation Group FPRINTF(3)