08-27-2009
It works! Thanks so much - you just saved me hours of manual typing!
Tina
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
In a particular path of a server I have number of files.The files are generated every date with a date_mth stap on this.There are different files for different clients.
For example in /data1 path i have
X_0416_Score
Y_0416_Score
Z_0417_Score
X_0417_Score
A_0417_Score
If i will run the... (1 Reply)
Discussion started by: dr46014
1 Replies
2. Shell Programming and Scripting
hi all,
i'm trying to pass a count of files to a variable thru these set of codes:
sh_count=$(ls -1 fnd_upload_LV*.* |wc -l)
problem is if no files matches that, it will give an error "ls: fnd_upload_LV*.*: No such file or directory".
how do i avoid having the shell script show that... (2 Replies)
Discussion started by: adshocker
2 Replies
3. Shell Programming and Scripting
Hi there
I have a .ksh script that I am using on an AIX ( Actual Level 5.3.10.0, Maintenance Level 5.3.0.0) where I am logging into a windows box, doing a file count on that server and returning the output to the UNIX session.
I would like to exit the script at this point in time if the... (10 Replies)
Discussion started by: jimbojames
10 Replies
4. Shell Programming and Scripting
So I have a loop that stated if a directory exists or not. If it does it prints the number of files within that directory. I use this code...
result=`(ls -l . | egrep -c '^-')`
However, no matter which directory I input, it outputs the number "2"
What is wrong here? (4 Replies)
Discussion started by: itech4814
4 Replies
5. Shell Programming and Scripting
I have 2 input files;
file1:
1 1000 2000 x1
1 5000 7000 x5
1 8000 10000 x8
file2:
1 1000 x1 z1
2 1001 x2 z2
1 1999 x3 z3
2 2000 x4 z4
1 2001 x5 z5
1 2002 x6 z6
1 6100 x7 z7
1 6200 x8 z8
1 7500 x9 z9
2 8500 x10 z10
I want to get the output look like this (1 Reply)
Discussion started by: akenaza
1 Replies
6. Shell Programming and Scripting
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies
7. Shell Programming and Scripting
Hi All,
I have script which call test utility and it takes token input which is kept in a separate file. now instead of taking tokens from single file,will keep 5 input files and script should read tokens from each files.
EX : There will 5 token.txt file which will have say around 1000... (1 Reply)
Discussion started by: Optimus81
1 Replies
8. Shell Programming and Scripting
Dear All ,
i stuck in one problem executing xml .. i have input xml as
<COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial">
<SVLOBJECT>
<LONG name="CSP_PMNT_ID" val="-1"/>
<MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/>
... (6 Replies)
Discussion started by: arvindng
6 Replies
9. Shell Programming and Scripting
Hello, I have a series of files in sub-directories that I want to loop through, process and name according to the input filename and the various parameters I'm using to process the files. I have a number of each, for example file names like AG005574, AG004788, AG003854 and parameter values like... (2 Replies)
Discussion started by: bdeads
2 Replies
10. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
LEARN ABOUT HPUX
setresgid
setresuid(2) System Calls Manual setresuid(2)
NAME
setresuid, setresgid - set real, effective, and saved user and group IDs
SYNOPSIS
DESCRIPTION
sets the real, effective and/or saved user ID of the calling process.
If the current real, effective or saved user ID is equal to that of a user having appropriate privileges, sets the real, effective and
saved user IDs to ruid, euid, and suid, respectively. Otherwise, only sets the real, effective, and saved user IDs if ruid, euid, and suid
each match at least one of the current real, effective, or saved user IDs.
If ruid, euid, or suid is leaves the current real, effective or saved user ID unchanged.
sets the real, effective and/or saved group ID of the calling process.
If the current real, effective or saved user ID is equal to that of a user having appropriate privileges, sets the real, effective, and
saved group ID to rgid, egid, and sgid, respectively. Otherwise, only sets the real, effective and saved group ID if rgid, egid, and sgid
each match at least one of the current real, effective or saved group ID.
If rgid, egid, or sgid is leaves the current real, effective or saved group ID unchanged.
Security Restrictions
Some or all of the actions associated with this system call require the privilege (CHSUBJIDENT). Processes owned by the superuser will
have this privilege. Processes owned by other users may have this privilege, depending on system configuration.
See privileges(5) for more information about privileged access on systems that support fine-grained privileges.
RETURN VALUE
Upon successful completion, and return 0; otherwise, they return -1 and set to indicate the error.
ERRORS
and fail if any of the following conditions are encountered:
ruid, euid, or suid (rgid, egid, or sgid) is not a valid user (group) ID.
None of the conditions above are met.
AUTHOR
and were developed by HP.
SEE ALSO
exec(2), getuid(2), setuid(2), privileges(5).
setresuid(2)