02-05-2007
Thanks reborg
I finally got the message.
The file path was being repeated.
10 More Discussions You Might Find Interesting
1. Programming
I am writing a program in C.
It is kind of a daemon process.
In this program, at the end of every 2 hours,
i need to fire an event. How can i achieve this
timer effect in my program? (1 Reply)
Discussion started by: Nadeem Mistry
1 Replies
2. Shell Programming and Scripting
Hi guys
I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file.
#!/bin/sh
echo " $2 $3 $4 $5 $6 $7
isql -w400 -U$2 -S$5 -P$3 << xxx
use $4
go
print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies
3. Shell Programming and Scripting
This is the final first release of the dynamic menu generator for pekwm (WM).
#!/bin/bash
function param_val {
awk "/^${1}=/{gsub(/^${1}="'/,""); print; exit}' $2
}
echo "Dynamic {"
for CF in `ls -c1 /usr/share/applications/*.desktop`
do
name=$(param_val Name $CF)
... (3 Replies)
Discussion started by: alexscript
3 Replies
4. Shell Programming and Scripting
consider the script below
sh /opt/hqe/hqapi1-client-5.0.0/bin/hqapi.sh alert list --host=localhost --port=7443 --user=hqadmin --password=hqadmin --secure=true >/tmp/alerts.xml
awk -F'' '{for(i=1;i<=NF;i++){
if($i=="Alert id") {
if(id!="")
if(dt!=""){
cmd="sh someScript.sh... (2 Replies)
Discussion started by: vivek d r
2 Replies
5. Shell Programming and Scripting
Hi,
I am using the below command to connect to a remote Oracle DB from my unix shell script.
sqlplus -s user1/password1@remotedbhost:1252/demo @/tmp/PROC_MS.prc
But I get the below error.
1. Can you confirm if my code is correct ?
2. Can you help me overcome the error ? (3 Replies)
Discussion started by: mohtashims
3 Replies
6. Shell Programming and Scripting
Hi,
I would like to get the audit log with username, directory and the date whenever user fires 'rm' command anywhere in the file locations.
Is there any possibility to capture the 'rm' command and its parameters from any environment by the single function ?
Please advise me.
... (4 Replies)
Discussion started by: Joviac
4 Replies
7. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies
8. UNIX for Dummies Questions & Answers
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies
9. War Stories
Would you fire this guy?
A man appears to have deleted his entire company with one mistaken piece of code.
By accidentally telling his computer to delete everything in his servers, hosting provider Marco Marsala has seemingly removed all trace of his company and the websites that he looks... (1 Reply)
Discussion started by: jon80
1 Replies
10. UNIX for Beginners Questions & Answers
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT HPUX
diskowner
diskowner(1M) diskowner(1M)
NAME
diskowner - retrieve the owner of a storage device
SYNOPSIS
path
DESCRIPTION
The command is used to retrieve the subsystem, if any, which is using the specified path. The command is intended to help prevent users
from overwriting storage that is already in use. The command will print out the owner of the path, or if no owner was found. A storage
device is considered owned by a subsystem if it has been formatted by that subsystem. For example, if a disk contains a VxFS filesystem,
but is not mounted or in use, it is still considered owned by the VxFS subsystem.
If the path specified is invalid or inaccessible, an error message will be printed.
Options and Arguments
The command recognizes the following options and arguments:
path The path name to the storage device. The path may be a symbolic link, as long as it points to a storage device, such as a file,
disk, or logical volume.
List all the owners of the specified path, seperated by commas
Produce a compact output that is easily parsed by other scripts and
programs. When used with option, displays all the owners seperated by dots This format is described in the section below.
Output from diskowner
displays the following possible output:
owner The owner of the given path. owner can be one of the following:
The path is not owned by any known subsystem.
The path is part of an LVM volume group.
The path is part of a VxVM volume group.
The path has a VxFS filesystem on it.
The path has a HFS filesystem on it.
The path is being used as a swap device.
The path is being used as a dump device.
The path is part of an Oracle database.
The path has EFI partitions on it.
message An error message displayed when the given path is invalid or inaccessible.
Compact Listing
The option generates a compact, colon delimited listing that is easy to parse. The output format is:
and so forth.
The option, when used with the option, produces this output format:
and so forth.
The current command prints out the keys and values listed below. In the future, new keys and/or values may be added to the output.
or
or
where
path is the pathname passed as argument
owner is the owner of the given path
message is an error message when given path is invalid or inaccessible.
n is number of owners of the given path
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
If is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)).
RETURN VALUE
Upon completion, returns one of the following values:
The path is not owned (the owner is
The path is already owned by a subsystem.
The path does not exist.
Invalid options or library version incompatible.
The path cannot be opened due to an I/O error.
The path cannot be opened due to insufficient permissions.
The path format is invalid.
EXAMPLES
Display the owner of a disk path:
Display the owner of a logical volume in compact output:
Display all the owners of a disk path:
Display all the owners of a logical volume in compact output:
SEE ALSO
crashconf(1M), df(1M), swapinfo(1M), vgdisplay(1M), vxvmboot(1M), vxassist(1M), fstab(4).
diskowner(1M)