07-16-2008
Thanks Annihilanic. Would you know how to circumvent the ls: Arg list too long problem ?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Made changes to a file using vi editor and saved those changes
now realised that the changes are not required
How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Discussion started by: novice100
3 Replies
2. Shell Programming and Scripting
Hi. Our shop is migrating to a new UNIX server and our hope is to do a full migration of all files to the new server weeks in advance of the final migration. As a result we want to identify files on our SOLARIS 8 UNIX server that have changed or that were created after a specific date & time... (2 Replies)
Discussion started by: buechler66
2 Replies
3. UNIX for Dummies Questions & Answers
How do I do it? Simple answers preferred... using BASH.. the less code the better.
I want to find out where Indesign is caching PDF tmp data ... I figure this is a good way to do it.. either way i wanna know how to do it. (2 Replies)
Discussion started by: glev2005
2 Replies
4. Shell Programming and Scripting
Hi,
I want to modify a filename in AIX by attaching the last modified timestamp. I want the timestamp completely in numerical format (eg:200905081210. yr-2009, mnth - 05, date -08, hr - 12, mins - 10).
For example if the filename is a.log and it was modified on April 6th 2008 at 21.00. I... (16 Replies)
Discussion started by: Ruks
16 Replies
5. UNIX for Dummies Questions & Answers
Hello-
I need to copy a file into multiple directories, and each directory's sub-directories (of which there are 5)
Currently, the parent directory is set up like this:
dir1
sub-dir1
sub-dir2
sub-dir3
sub-dir4
sub-dir5
dir2
sub-dir1
sub-dir2
sub-dir3
... (1 Reply)
Discussion started by: penlok
1 Replies
6. Shell Programming and Scripting
Hi
Is it possible to compare the modified dates of all the files in two directories using shell script?
I would like to take a backup of a directory in production server regularly.
Instead of copying all the files in the directory, is it possible to list only the files that are... (2 Replies)
Discussion started by: ashok.k
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
How can I move directories (and all sub directories/files) from one directory to another based on the modified date of the directory?
Currently the existing structure looks like this:
/public_html/media/videos/tmb/34947/image1.jpg
/public_html/media/videos/tmb/34947/image2.jpg
... (0 Replies)
Discussion started by: lbargers
0 Replies
8. Shell Programming and Scripting
Hi All ,
I have a directory called "/usr/local/apache/docs/" inside this docs i have below directories ,
bash-2.05# pwd
/usr/local/apache/docs/
bash-2.05#ls -l | less
2 drw-r-xr-x 3 root root 512 Aug 8 2010 Form1
2 drw-r-xr-x 3 root other 512 Mar 8 ... (4 Replies)
Discussion started by: gnanasekar_beem
4 Replies
9. Shell Programming and Scripting
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies
10. Shell Programming and Scripting
I am trying to look into multiple directories and pluck out the latest version of a specific file, regardless of where it sits within the directory structure.
Ex:
The file is a .xls file and could have a depth within the directory of anywhere from 1-5
Working directory - Folder1... (6 Replies)
Discussion started by: co21ss
6 Replies
LEARN ABOUT HPUX
xtsetarg
XtSetArg() XtSetArg()
Name
XtSetArg - set a resource name and value in an argument list.
Synopsis
void XtSetArg(arg, resource_name, value)
Arg arg;
String resource_name;
XtArgVal value;
Inputs
arg Specifies the Arg structure to set.
resource_name
Specifies the name of the resource.
value Specifies the value of the resource, or its address.
Description
XtSetArg() sets arg.name to resource_name, and sets arg.value to value. If the size of the resource is less than or equal to the size of
an XtArgVal, the resource value is stored directly in value; otherwise, a pointer to it is stored in value.
XtSetArg() is implemented as the following macro:
#define XtSetArg(arg, n, d) ((void)( (arg).name = (n), (arg).value = (XtArgVal)(d) ))
Because this macro evaluates arg twice, you must not use an expression with autoincrement, autodecrement or other side effects for this
argument.
Usage
Many Intrinsics functions need to be passed pairs of resource names and values in an ArgList to set or override resource values. XtSe-
tArg() is used to set or dynamically change values in an Arg structure or ArgList array.
Note that in Release 4, a number of functions beginning with the prefix XtVa were added to the Intrinsics. These functions accept a NULL-
terminated variable-length argument list instead of a single ArgList array. Often these forms of the functions are easier to use.
Example
XtSetArg() is usually used in a highly stylized manner to minimize the probability of making a mistake; for example:
Arg args[20];
int n;
n = 0;
XtSetArg(args[n], XtNheight, 100); n++;
XtSetArg(args[n], XtNwidth, 200); n++;
XtSetValues(widget, args, n);
Incrementing the array index on the same line means that resource settings can be easily read, inserted, deleted or commented out on a
line-by-line basis. If you use this approach, be careful when using XtSetArg() inside an if statement-don't forget to use curly braces to
include the increment statement.
Alternatively, an application can statically declare the argument list:
static Args args[] = {
{XtNheight, (XtArgVal) 100},
{XtNwidth, (XtArgVal) 200},
};
XtSetValues(Widget, args, XtNumber(args));
Structures
The Arg and ArgList types are defined as follows:
typedef struct {
String name;
XtArgVal value;
} Arg, *ArgList;
The definition of XtArgVal differs depending on architecture-its purpose is precisely to make code portable between architectures with dif-
ferent word sizes.
See Also
XtMergeArgLists(1), XtNumber(1).
Xt - Argument Lists XtSetArg()