I am trying to get a total number of tapes w/out headers or footers in a ERV file and append it to the file. For some reason I cannot get it to work. Any ideas?
#!/bin/sh
dat=`date +"%b%d_%Y"`
+ date +%b%d_%Y
dat=Nov16_2006
tapemgr="/export/home/legato/tapemgr/rpts"... (1 Reply)
I]hi all
i am in confusion since last 2 days :(
i posted thraed yesterday and some friends did help but still i couldnt get solution to my problem
let it be very clear
i have a long log file of alkatel switch and i have to seperate the minor major and critical alarms shown by ! , !! and !!!... (6 Replies)
Hi,
I am trying to write a code for changing header date of a file with a date of 6 month back.
Below is the header date on which I am working -
20080531
I want to change it as 20071130
Please suggest me in the way like ,I can change any date in a file with date of 6 months back.
... (9 Replies)
Hi Folks,
I've searched for this for quite a while, but can't find any solution - hope someone can help.
I have various files with standard headers. eg.
<HEADER>
IP: 1.2.3.4
Username: Joe
Time: 12:00:00
Date: 23/05/2010
</HEADER>
This
is
a
test
and this part can be any size... (6 Replies)
Hi,
I have a log file created from a load balancer showing connections to each member of a two member pool with the following format (where first field is source IP, second field is load balanced IP address and third field is destination member. I need to plot a graph by date/time and number of... (5 Replies)
In a bash shell, I have to prefix a variable to two .CSV files File1.CSV and File2.CSV. One of the files has a header and the other one is with no header in the below format:
"value11","value12","value13","value14","value15","value16"
"value21","value22","value23","value24","value25","value26"... (7 Replies)
I'm trying to take mrt output and put it at the top of a file along with the date and time. I was able to do it at the bottom of the file with the following
printf "********** $(date) **********\n\n" >> $OUTPUT_PATH/$HOSTNAME
mtr -r -w -c 10 $HOSTADDRESS >> $OUTPUT_PATH/$HOSTNAME
printf... (2 Replies)
Dear All,
assume i have a file with content:
<Start>6000</Start>
<Stop>7599</Stop>
the output is:
6000
7000
7100
7200
7300
7400
7599
how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix.
Thanks
Jimmy (3 Replies)
In the bash below which does execute I am trying to extract the contents of ${id} is 1234, as ${id} stores the variable that changes each time.
After the path is removed the contents of ${id} are stored in pref, so they can be used in the output. Currently I am not able to extract the 1234 in the... (6 Replies)
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
LEARN ABOUT OPENSOLARIS
acl_get
acl_get(3SEC) File Access Control Library Functions acl_get(3SEC)NAME
acl_get, facl_get, acl_set, facl_set - get or set a file's Access Control List (ACL)
SYNOPSIS
cc [ flag... ] file... -lsec [ library... ]
#include <sys/acl.h>
int *acl_get(const char *path, int flag, acl_t **aclp);
int *facl_get(int fd, int flag, acl_t **aclp);
int acl_set(const char *path, acl_t *aclp);
int facl_set(int fd, acl_t *aclp);
DESCRIPTION
The acl_get() and facl_get() functions retrieve an Access Control List (ACL) of a file whose name is given by path or referenced by the
open file descriptor fd. The flag argument specifies whether a trivial ACL should be retrieved. When the flag argument is ACL_NO_TRIVIAL,
only ACLs that are not trivial will be retrieved. The ACL is returned in the aclp argument.
The acl_set() and facl_set() functions are used for setting an ACL of a file whose name is given by path or referenced by the open file
descriptor fd. The aclp argument specifies the ACL to set.
The acl_get() and acl_set() functions support multiple types of ACLs. When possible, the acl_set() function translates an ACL to the tar-
get file's style of ACL. Currently this is only possible when translating from a POSIX-draft ACL such as on UFS to a file system that sup-
ports NFSv4 ACL semantics such as ZFS or NFSv4.
RETURN VALUES
Upon successful completion, acl_get() and facl_get() return 0 and aclp is non-NULL. The aclp argument can be NULL after successful comple-
tion if the file had a trivial ACL and the flag argument was ACL_NO_TRIVIAL. Otherwise, -1 is returned and errno is set to indicate the
error.
Upon successful completion, acl_set() and facl_set() return 0. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
These functions will fail if:
EACCES The caller does not have access to a component of path.
EIO A disk I/O error has occured while retrieving the ACL.
ENOENT A component of the path does not exist.
ENOSYS The file system does not support ACLs.
ENOTSUP The ACL supplied could not be translated to an NFSv4 ACL.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO chmod(1), acl(2), acl(5), attributes(5)SunOS 5.11 6 Oct 2005 acl_get(3SEC)