09-27-2010
Thank you so much for the advice.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've got a file, where I want to grab two fields from it. The file isn't fixed format, so all I know is that the two fields are after a certain number of delimiters within the record.
File e.g. as follows:-
"1"^"HEADER"^
"5"^"12345678"^"Smith"^"Dave"^"Mr"^"Research &... (1 Reply)
Discussion started by: daveaasmith
1 Replies
2. Shell Programming and Scripting
I want to remove the commented lines in a file identified by ' symbol at the start of each ine. A sample example will be like:
Input
-----
'IFerr_flag=0THEN
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
Output
-------... (3 Replies)
Discussion started by: joyan321
3 Replies
3. Shell Programming and Scripting
Hello,
I try to write a shell script that would list all files on a directory and stop when it finds the first item specified on a find or ls command.
How can I tell to the find or ls command to stop when it finds the first ".doc" file for example ?
Thank you (7 Replies)
Discussion started by: davchris
7 Replies
4. Solaris
deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies
5. Shell Programming and Scripting
Hi,
I have a file generated like this -
1. Fire SQL and store the formatted output in a temp file
echo "select path, empid, age from emp_tbl" | /usr/sql emp_db 2 > count_file | grep vol > tempFile
2. The tempFile looks like this after the above statement
/vol/emp1 0732 ... (9 Replies)
Discussion started by: angshuman_ag
9 Replies
6. Shell Programming and Scripting
File A
>answer is the predicted other than >bigger than two
>whatever isthere >out of mind
CGAHHAWWASSASS
SASAWEDSASSDDD
SSDDDEDEUJUYYS
>hello you are there other is what is that>you are not
serious>leave it
SSSAAAAAASS
ASWWQQDDD
WESEEWWWW
WEEEEEWSS
SJUJSGKKSSS
SWBVHJJWUW
>hi i... (3 Replies)
Discussion started by: cdfd123
3 Replies
7. Programming
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies
8. Shell Programming and Scripting
Hello,
I have some tab delimited text data,
file: final_temp1
aname val
NAME;r'(1,) 3.28584
r'(2,)<tab>
NAME;r'(3,) 6.13003
NAME;r'(4,) 4.18037
r'(5,)<tab>
You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Discussion started by: LMHmedchem
2 Replies
9. UNIX for Beginners Questions & Answers
Dear all,Zabbix version : 2.4 (yes, I know, upgrading soon - honest)
Server OS version : CentOS 6, 64-bit (CentOS 7 with the Zabbix upgrade)I've got a large log file that I would like to read by an external process. It's basically the same as reading the item value on a web-page. I have... (5 Replies)
Discussion started by: rbatte1
5 Replies
10. Shell Programming and Scripting
Hello,
I have a src code file where I need to uncomment many lines.
The lines I need to uncomment look like,
C CALL l_r(DESNAME,DESOUT, 'Gmax', ESH(10), NO_APP, JJ)
The comment is the "C" in the first column. This needs to be deleted so that there are 6 spaces preceding "CALL".... (7 Replies)
Discussion started by: LMHmedchem
7 Replies
LEARN ABOUT OPENSOLARIS
posix_fadvise
posix_fadvise(3C) Standard C Library Functions posix_fadvise(3C)
NAME
posix_fadvise - file advisory information
SYNOPSIS
#include <fcntl.h>
int posix_fadvise(int fd, off_t offset, off_t len, int advice);
DESCRIPTION
The posix_fadvise() function advises the system on the expected behavior of the application with respect to the data in the file associated
with the open file descriptor, fd, starting at offset and continuing for len bytes. The specified range need not currently exist in the
file. If len is zero, all data following offset is specified. The system may use this information to optimize handling of the specified
data. The posix_fadvise() function has no effect on the semantics of other operations on the specified data, although it may affect the
performance of other operations.
The advice to be applied to the data is specified by the advice parameter and may be one of the following values:
POSIX_FADV_NORMAL Specifies that the application has no advice to give on its behavior with respect to the specified data. It is the
default characteristic if no advice is given for an open file.
POSIX_FADV_SEQUENTIAL Specifies that the application expects to access the specified data sequentially from lower offsets to higher off-
sets.
POSIX_FADV_RANDOM Specifies that the application expects to access the specified data in a random order.
POSIX_FADV_WILLNEED Specifies that the application expects to access the specified data in the near future.
POSIX_FADV_DONTNEED Specifies that the application expects that it will not access the specified data in the near future.
POSIX_FADV_NOREUSE Specifies that the application expects to access the specified data once and then not reuse it thereafter.
These values are defined in <fcntl.h>
RETURN VALUES
Upon successful completion, posix_fadvise() returns zero. Otherwise, an error number is returned to indicate the error.
ERRORS
The posix_fadvise() function will fail if:
EBADF The fd argument is not a valid file descriptor.
EINVAL The value of advice is invalid, or the value of len is less than zero.
ESPIPE The fd argument is associated with a pipe or FIFO.
USAGE
The posix_fadvise() function has a transitional interface for 64-bit file offsets. See lf64(5).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
|Standard |See standards(5). |
+-----------------------------+-----------------------------+
SEE ALSO
posix_madvise(3C), attributes(5), standards(5)
SunOS 5.11 14 Jul 2008 posix_fadvise(3C)