07-26-2007
Jambesh,
I tried your code and its giving me this output
Quote:
[[ : not found
[[ : not found
[[ : not found
[[ : not found
[[ : not found
Any Idea how to correct the above error..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need some help in removing the header (first line) and the trailer (last line) in a give file...
The data file actually comes in EBCDIC format and I converted it into ASCII..
Now I need to strip off the first line and the last line..
I think we can use sed to do something like this:... (2 Replies)
Discussion started by: madhunk
2 Replies
2. Shell Programming and Scripting
Situation:
Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies
3. Shell Programming and Scripting
Hi,
Can any one tell me how to copy an alertlog file from a particular time stamp using shell script?
Thanks (3 Replies)
Discussion started by: suman_dba1
3 Replies
4. Shell Programming and Scripting
Hi All,
In my file i need to remove header and trailer records which comes in 1st line and last line respectively. After that i need to replace '$\|' with '$#@'.
I am using sed command for this and its taking lot of time. Is there any other command which can be used to improve performance?
... (1 Reply)
Discussion started by: HemaV
1 Replies
5. Shell Programming and Scripting
Hi All,
PFB is a requirement. I am new to shell scripting. So plz help. It would be highly appreciated.
1. choose all the log files based on a particular date (files location is '/test/domain')--i.e,we should choose all the files that are modified on 29th November, neither 28th nor 30th
2.... (3 Replies)
Discussion started by: skdas_niladri
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to add the below Header to all the files in sequence File1,File2,File3...etc
"ABC,<number of chracter in the file>"
e,g - If File1 is as below
pqrstuvdt
abcdefgh
then I want to add the above header into it ,So that File1 becomes as below
ABC,17
pqrstuvdt
abcdefgh
... (9 Replies)
Discussion started by: spari2
9 Replies
7. Shell Programming and Scripting
Hi All,
I am trying write a simple command using AWK and SED to this but without any success.
Here is what I am using:
head -1 test1.txt>test2.txt|sed '1d;$d' test1.txt|awk '{print substr($0,0,(length($0)-2))}' >>test2.txt|tail -1 test1.txt>>test2.txt
Input:
Header
1234567
abcdefgh... (2 Replies)
Discussion started by: nvuradi
2 Replies
8. Shell Programming and Scripting
Hi,
I need a script that validates a file header/detail/trailer. File layout is:
Header - Rec_Type|File_name|File_Date
Detail - Rec_Type|field1|field2|field3...
Trailder - Rec_Type|File_name|File_Date|Record_count
Sample Data:
HDR|customer_data.dat|20120709... (7 Replies)
Discussion started by: ash_sh
7 Replies
9. Shell Programming and Scripting
please see my requirement, I hope I am clear. (9 Replies)
Discussion started by: mirwasim
9 Replies
10. UNIX for Beginners Questions & Answers
Hi Experts
Need help...
I am looking for a Unix script to append pipe | at the end of all the rows (except header and trailer)in all the files placed under the directory /interfaces/Temp
e.g.
Header
row1
row2
row3
Trailer
The script should read all the files under... (3 Replies)
Discussion started by: phani333
3 Replies
LEARN ABOUT CENTOS
uselib
USELIB(2) Linux Programmer's Manual USELIB(2)
NAME
uselib - load shared library
SYNOPSIS
#include <unistd.h>
int uselib(const char *library);
DESCRIPTION
The system call uselib() serves to load a shared library to be used by the calling process. It is given a pathname. The address where to
load is found in the library itself. The library can have any recognized binary format.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
In addition to all of the error codes returned by open(2) and mmap(2), the following may also be returned:
EACCES The library specified by library does not have read or execute permission, or the caller does not have search permission for one of
the directories in the path prefix. (See also path_resolution(7).)
ENFILE The system limit on the total number of open files has been reached.
ENOEXEC
The file specified by library is not an executable of known type, e.g., does not have the correct magic numbers.
CONFORMING TO
uselib() is Linux-specific, and should not be used in programs intended to be portable.
NOTES
uselib() was used by early libc startup code to load the shared libraries with names found in an array of names in the binary.
Since libc 4.3.2, startup code tries to prefix these names with "/usr/lib", "/lib" and "" before giving up. In libc 4.3.4 and later these
names are looked for in the directories found in LD_LIBRARY_PATH, and if not found there, prefixes "/usr/lib", "/lib" and "/" are tried.
From libc 4.4.4 on only the library "/lib/ld.so" is loaded, so that this dynamic library can load the remaining libraries needed (again
using this call). This is also the state of affairs in libc5.
glibc2 does not use this call.
SEE ALSO
ar(1), gcc(1), ld(1), ldd(1), mmap(2), open(2), dlopen(3), capabilities(7), ld.so(8)
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2005-01-09 USELIB(2)