I'm using the UNIX csh and i wish to use recursion to nav my way up (or down as it is) a given folder.
My little test script is called "r" and takes a folder as argv (or $1)
#!/bin/tcsh -f
set allFiles = `ls -A $argv`
cd $argv
while ($#allFiles)
if (-d... (1 Reply)
I am running a korn shell script which has a recursive function.
The script ran for 117 iterations and ended up with the following error
"recursion too deep".
what should be done to avert this?
Thanks in advance
Swamy
p.s. I am on UNIX MPRAS V4 (3 Replies)
Hello !
I need some help with my simple bash script.
This script removes all files ( with name given in $1 ) in current dir and subdirectories .
The problem is with first loop in the script ( for file in * ; do ) .
When I run the sript in my home directory this script display sometimes( ... (5 Replies)
Hello every body. I am trying to find the factorial using the following code. But it is giving the syntax error. I tried very much but in vain. Thanks in advance for helping me
factorial()
{
if
then
y=`expr $1 - 1`
x=$(( $1 \* factorial $y ))... (6 Replies)
Hi,
If i have given to write a prog for factorial in C using recursion and without
recursion which one is better in what condition and why ?
thanks (2 Replies)
Hi folks,
I need to write a script which remove files with suffix *.dmp from a specific directory ,older than 30 days and not including recursive subdirectories.
I.e:
The following command remove recursive all *.dmp files older than 30 days:
find $ORACLE_BASE -mtime +30 -type f -name... (5 Replies)
Hello, I'm scripting a newbie. I'm using KSH on HP-UX. I'm trying to write a script that will change a whole directory of file names into UPPER CASE.
I have the "convert to upper case" part of it working fine:
ls | while read filename; do
typeset -u uppercase
uppercase=${filename}
... (2 Replies)
I want to halt a tail recursive function after certain validation. I want to come out of entire recursion without unwinding phase. How can i achieve that . The coding is done in C language. (5 Replies)
Can someone please explain me why the following script calls it self recursively:
#!/bin/bash
echo Called
$0
while this not:
#!/bin/bash
echo Called
$($0)
Thanks (6 Replies)
Hi,
I am trying to disable the recursion on DNS server (Solaris 10). I have added the lines in the named.conf as below:
allow-query-cache { none; };
recursion no;
Then restarted the solaris DNS services
svcadm refresh svc:/network/dns/server:default
Still I am able to... (0 Replies)
Discussion started by: snchaudhari2
0 Replies
LEARN ABOUT CENTOS
zip_get_name
ZIP_GET_NAME(3) Library Functions Manual ZIP_GET_NAME(3)NAME
zip_get_name - get name of file by index
LIBRARY
libzip (-lzip)
SYNOPSIS
#include <zip.h>
const char * zip_get_name(struct zip *archive, int index, int flags);
DESCRIPTION
The zip_get_name function returns the name of the file at position index in archive. If flags is set to ZIP_FL_UNCHANGED, the original
unchanged filename is returned. The returned string must not be modified or freed, and becomes invalid when archive is closed.
RETURN VALUES
Upon successful completion, a pointer to the name is returned. Otherwise, NULL and the error code in archive is set to indicate the error.
ERRORS
zip_get_name fails if:
[ZIP_ER_DELETED]
index refers to a file that has been deleted (see zip_delete(3) ).
[ZIP_ER_INVAL]
index is not a valid file index in archive, or index points to an added file and ZIP_FL_UNCHANGED is set.
SEE ALSO libzip(3), zip_name_locate(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH January 20, 2005 ZIP_GET_NAME(3)