Telling us what OS and shell you're using helps us create a solution that will work in your environment.
With a 1993 or later version of ksh or with a recent bash, here are a couple of ways to do what you seem to want:
which (with both of those shells) produces the output:
Hi All ,
I am having confusion in a shell script. Please guide me.
I need to get multiple files (number of files vary time to time, file names are separated by '|') using FTP get from the remote server.
Actually, i call the FTP function in a loop. At the last step, i need to move all the get... (3 Replies)
Hello,
I have a question regarding file naming under a loop in tcsh. I have the following code:
#!/bin/tcsh
foreach file (test/ProteinDirectory/*) # The * is a bunch of ProteinFile1, ProteinFile2, ProteinFile3, etc.
sh /bioinfo/home/dgendoo/THREADER/pGenThreader.sh $file $file
... (4 Replies)
I have an xml file with the structure:
<tag1>
<value1>xyx</value1>
<value2>123</value2>
</tag1>
<tag1>
<value1>568</value1>
<value2>zzzzz</value2>
</tag1>
where I want to parse each data pair in the this single file, so something like:
find first tag1 data pair... (1 Reply)
Hey all,,
I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use.
lets say i have a list..
set arr=(x y z e f)
I wanna iterate the list with foreach ,, not with while.!!
foreach i $arr
echo $i
end
does not work (2 Replies)
I need to load an XML file and loop through a list of nodes in it to execute a shell script for each one using the attributes for each node as parameters for the script. Any ideas? Any help will be much appreciated. (1 Reply)
I'm trying to send the file list as parameter to another job and execute it.
But the loop doesn't work, the inner job is running only once and not twice as expected
for filelist in $(ls -rt *.txt | tail -2)
do
echo $filelist
export filelist
cmd="$Program -config $configfile -autoexec... (11 Replies)
OS : RHEL 6.1
Shell : Bash
I have lots of files in /tmp/stage directory as show below.
Using a loop, I need to print all the filenames in this directory except those ending with a number. How can I do this ?
# pwd
/tmp/stage
#
#
# ls -l *
-rw-r--r--. 1 root root 0 Oct 7 18:38 stmt1... (2 Replies)
Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Hi guys
I'm a beginner in fortran. So excuse me for my naivety, let me briefly describe what I was trying to do. I have let's say 2 files named reac-1 and reac-2. After opening these files I've to do some calculations, close these files and open the same files again in a loop. So my faulty code... (6 Replies)
Discussion started by: saleheen
6 Replies
LEARN ABOUT OSF1
advfs_get_fset_quotas
advfs_get_fset_quotas(3) Library Functions Manual advfs_get_fset_quotas(3)NAME
advfs_get_fset_quotas - Obtains fileset quotas for an AdvFS fileset
SYNOPSIS
#include <sys/advfs_syscalls.h>
int advfs_get_fset_quotas(
char *domainName,
char *filesetName,
filesetQuotasT *filesetQuotas );
LIBRARY
AdvFS Library (libadvfs)
PARAMETERS
A pointer to the name of the domain. A pointer to the name of the fileset. A pointer to a structure that will contain the fileset quotas
on successful return from this function.
DESCRIPTION
This function obtains the fileset quotas for the fileset specified by the domainName and filesetName parameters and returns them in the
structure specified in *filesetQuotas.
NOTES
Note that the advfs_get_fset_quotas function does not obtain: user or group quota information grace time information
Use the quotactl system call to obtain such data. See the quotactl(2) reference page for information.
Clone filesets cannot have fileset quotas. If you attempt to obtain fileset quotas for a clone fileset, an error occurs.
RETURN VALUES
The function returns a value of 0 (zero) on successful completion. The function returns a value of -1 on failure and sets the value of
errno to the specific error.
ERRORS
The function sets errno to the specified errors for the following failure conditions: The calling program is not running with root privi-
leges. An I/O error occurred on one of the disks in the file domain. The filesetId parameter does not refer to an existing fileset.
There is not enough memory available for the operation.
SEE ALSO
Commands: chfsets(8), showfsets(8)
Functions: quotactl(2), advfs_set_fset_quotas(3)advfs_get_fset_quotas(3)