I need a script that checks to see if ypserv is running, and if not it will restart yp.
I have a ypslave that is running Sol9, and the ypsrv daemon is dieing, I want to create a cron job that periodicly checks to see if it's running, and if it see's that it isn't, it will re-start the daemon (1 Reply)
Here is the script that i am trying to run. I get an error and i can't figure out what is the problem.
#!/bin/bash
echo "What is your name"
read NAME
if ; then
echo "My name is the same"
esle
echo "You have a nice name"
fi (11 Replies)
I am trying to print my script arguments, but i am stuck at the arrow pointed lines..please help
#!/bin/bash
echo "Number of arguments $#"
count=1
while
do
echo ${$count} <========================
count = $(expr $count +1) <==================
done (4 Replies)
hi guys, i am a noob to shell scripting, and i would like to run a simple script, that could simply do the following: 1. SFTP to a remote server/path...and download the newest *.gz backup file on that server. (there are many *.gz files in that folder, i simply need the latest one) 2. locally... (1 Reply)
I have a file that contains these lines
User ID Username
-------- ----------
7738626,zrazak
7783535,jvincigu
7805567,ldrennan
7805583,mtsakama
I need to sort the names alphabetically
How can I sort the lines based on the user names ?
I would appreciate a quick reply anyone
... (1 Reply)
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Hi team,
I have two select statements and need to run them using SYSDBA user
select * from temp_temp_seg_usage;
select segment_name, tablespace_name, bytes/ (1024*1024) UsedMb from
dba_segments where segment_name='TEMP_TEMP_SEG_USAGE';
Need to run this using a shell script say named... (1 Reply)
Hi,
new to unix and scripting, and i'm trying to set up a simple "if" script to create a seperate flag file dependant on success.
So far i have the following ($5 is a variable passed to the script from the backup job)
if
then
touch /u03/backups/backup_ended.flag
else
touch... (13 Replies)
I have to pull files from a customers cloud directory to our cloud directory periodically, the customer has the files in the new-version(nver) folder; which I am pulling via a python script. (python nver.py)
customers cloud location:
s3://custbucket/$nver/files
Our cloud location:... (0 Replies)
Discussion started by: ramky79
0 Replies
LEARN ABOUT PHP
rar_list
RAR_LIST(3) 1 RAR_LIST(3)RarArchive::getEntries - Get full list of entries from the RAR archive
Object oriented style (method):
SYNOPSIS
public array RarArchive::getEntries (void )
DESCRIPTION
Procedural style:
array rar_list (RarArchive $rarfile)
Get entries list (files and directories) from the RAR archive.
Note
If the archive has entries with the same name, this method, together with RarArchive foreach iteration and array-like access with
numeric indexes, are the only ones to access all the entries (i.e., RarArchive::getEntry and the rar:// wrapper are insufficient).
PARAMETERS
o $rarfile
- A RarArchive object, opened with rar_open(3).
RETURN VALUES rar_list(3) returns array of RarEntry objects or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 3.0.0 | |
| | |
| | Support for RAR archives with repeated entry |
| | names is no longer defective. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Object oriented style
<?php
$rar_arch = RarArchive::open('solid.rar');
if ($rar_arch === FALSE)
die("Could not open RAR archive.");
$rar_entries = $rar_arch->getEntries();
if ($rar_entries === FALSE)
die("Could retrieve entries.");
echo "Found " . count($rar_entries) . " entries.
";
foreach ($rar_entries as $e) {
echo $e;
echo "
";
}
$rar_arch->close();
?>
The above example will output something similar to:
Found 2 entries.
RarEntry for file "tese.txt" (23b93a7a)
RarEntry for file "unrardll.txt" (2ed64b6e)
Example #2
Procedural style
<?php
$rar_arch = rar_open('solid.rar');
if ($rar_arch === FALSE)
die("Could not open RAR archive.");
$rar_entries = rar_list($rar_arch);
if ($rar_entries === FALSE)
die("Could retrieve entries.");
echo "Found " . count($rar_entries) . " entries.
";
foreach ($rar_entries as $e) {
echo $e;
echo "
";
}
rar_close($rar_arch);
?>
SEE ALSO
RarArchive::getEntry, rar:// wrapper.
PHP Documentation Group RAR_LIST(3)