All solutions above rely on the fact that DAT's length is 4. Why not use that fact and run
which is close to Jotne's first proposal with some typos corrected.
Hi there,
I'm trying to find files that are greater then 30 days old, zip them and move to a different directory. I'm encountering an issue passing a variable (FilesToFind) to name within the find command. Here's the code I'm running:
#! /usr/bin/sh
FileDir=/home/ariba... (2 Replies)
#!/bin/ksh
VAR_ONE=HELLO
TEMP=ONE
echo $VAR_${TEMP}
## Output is: ONE
Hi, I want the output to echo HELLO and not ONE as the above script does. I know I am missing something with dollar substitution. Can anyone help me out ?
Thanks.
Cal (4 Replies)
Hi ,
I have have file which has following structure
01aaaa88888000-9999
01ssss77777000-0991
01ssss7777700000991
02ssss7777700000991
The record 01 is corrupt as value from 12th field to 19th should be positive or start with - however it is 000-9999 it should be -0009999
i need to... (4 Replies)
Hi There,
I am writing a ksh script which assigns variable values from file "A" and passes that variables to file "B". While passing the parameters an additional "$" sign is being assigned to awk -v option.
Could any one help me with this please.
#!/bin/ksh
head -1... (3 Replies)
dear,
I have below file called folderlist.txt
# ParentFolder environment_flag SubFolders
triss 1 checksum
bookstructure 1
fx 1 checksum_GMDB
I have a script which which will create the folders under... (3 Replies)
Hi,
I am doing an AWK in ksh as below with the string to search to be read from variable but for some reason there is no output. It works when I hard code it.
awk 'substr($0,22,6)=="${VAR}"' XXX.txt' >YYY.txt
On reading other posts I tried below option,
'substr($0,22,6)=="/"${VAR}/""'
... (3 Replies)
Hi All,
I am trying to use a variable within the sed command but I am not able to get the output.
When I am using the following command (without variable) its working fine:
sed -n '/2011\/12\/10 18:11:11./,$p' < Log.txt > Delta_Log.txt
But when I am putting the value 2011\/12\/10... (4 Replies)
Hi All,
I have one file with below content
Post1:uri
Post2:urieop
Post3:urtei
I am trying to read each word seprated by delimiter with below command
Value1=$(awk -F":" '{print $1}' $HSFILE)
Value2=$(awk -F":" '{print $2}' $HSFILE)
echo $Value1
echo $Value2
It is... (5 Replies)
Hi,
If i were to do this an print out the file, it will show as it is in the command
$ awk '/Privilege Use/ {P=0} /Object Access/ {P=1} P' AdvancedAudit.txt
Object Access
File System No Auditing
Registry No Auditing
Kernel... (1 Reply)
Hi,
I'm writing a shell script and trying to grep a variable value, it works fine as long as there is a value in /tmp/list.out which is captured in $DSK but sometimes the file tends to be empty and that is where I'm having an issue while using grep which returns nothing. I know I can use something... (15 Replies)
Discussion started by: mbak
15 Replies
LEARN ABOUT SUNOS
dat_rsp_create
dat_rsp_create(3DAT) Direct Access Transport Library Functions dat_rsp_create(3DAT)NAME
dat_rsp_create - create a Reserved Service Point
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include <dat/udat.h>
DAT_RETURN
dat_rsp_create (
IN DAT_IA_HANDLE ia_handle,
IN DAT_CONN_QUAL conn_qual,
IN DAT_EP_HANDLE ep_handle,
IN DAT_EVD_HANDLE evd_handle,
OUT DAT_RSP_HANDLE *rsp_handle
)
PARAMETERS
ia_handle Handle for an instance of DAT IA.
conn_qual Connection Qualifier of the IA the Reserved Service Point listens to.
ep_handle Handle for the Endpoint associated with the Reserved Service Point that is the only Endpoint that can accept a Connection
Request on this Service Point. The value DAT_HANDLE_NULL requests the Provider to associate a Provider-created Endpoint
with this Service Point.
evd_handle The Event Dispatcher to which an event of Connection Request arrival is generated.
rsp_handle Handle to an opaque Reserved Service Point.
DESCRIPTION
The dat_rsp_create() function creates a Reserved Service Point with the specified Endpoint that generates, at most, one Connection Request
that is delivered to the specified Event Dispatcher in a Notification event.
RETURN VALUES
DAT_SUCCESS The operation was successful.
DAT_INSUFFICIENT_RESOURCES The operation failed due to resource limitations.
DAT_INVALID_HANDLE The ia_handle, evd_handle, or ep_handle parameter is invalid.
DAT_INVALID_PARAMETER The conn_qual parameter is invalid.
DAT_INVALID_STATE Parameter in an invalid state. For example, an Endpoint was not in the Idle state.
DAT_CONN_QUAL_IN_USE Specified Connection Qualifier is in use.
USAGE
The usage of a Reserve Service Point is as follows:
o The DAT Consumer creates a Local Endpoint and configures it appropriately.
o The DAT Consumer creates a Reserved Service Point specifying the Local Endpoint.
o The Reserved Service Point performs the following:
o Collects native transport information reflecting a received Connection Request.
o Creates a Pending Connection Request.
o Creates a Connection Request Notice (event) that includes the Pending Connection Request (which includes, among others, Reserved
Service Point Connection Qualifier, its Local Endpoint, and information about remote Endpoint).
o Delivers the Connection Request Notice to the Consumer-specified target (CNO) evd_handle. The Local Endpoint is transitioned from
Reserved to Passive Connection Pending state.
o Upon receiving a connection request, or at some time subsequent to that, the DAT Consumer must either accept() or reject() the Pending
Connection Request.
o If accepted, the original Local Endpoint is now in a Connected state and fully usable for this connection, pending only native trans-
port mandated RTU messages. This includes binding it to the IA port if that was not done previously. The Consumer is notified that the
Endpoint is in a Connected state by a Connection Established Event on the Endpoint connect_evd_handle.
o If rejected, the Local Endpoint point transitions into Unconnected state. The DAT Consumer can elect to destroy it or reuse it for
other purposes.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard: uDAPL, 1.1, 1.2 |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO libdat(3LIB), attributes(5)SunOS 5.10 16 Jul 2004 dat_rsp_create(3DAT)