07-20-2009
Seems like you've simply copied the stuff from your project's technical document over here.
Quote:
Originally Posted by
aavam
...
Thank you in advance for your Help as i am desperately seeking a solution. ...
Since you are seeking a solution desperately, you must've tried something at your end. Instead of copying an entire specification, post just the relevant part of your scripts and ask *very* specific questions/doubts about the points where you got stuck.
tyler_durden
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in
1) starting with "20071126 11:11:11 Machine Header 1"
1000 lines...
"End machine header 1"
2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies
2. Shell Programming and Scripting
Hi all,
I have to generate some report from shell script .We have stacktrace log file which generate hourly basis.
So now my q is that how this shell script will read all stacktrace log file for particlular day and parse accordingly desire output.
Any help or suggestion as i am newbie with... (1 Reply)
Discussion started by: esungoe
1 Replies
3. Shell Programming and Scripting
Hi All,
I have a to read a file and put the result in one line. The i am reading from contain the data like below.
1 signifies the beging of the new line. (6 Replies)
Discussion started by: lottiem
6 Replies
4. UNIX for Dummies Questions & Answers
Howdy Folks,
I have a list that looks like this:
(file2.txt)
AAA
BBB
CCC
DDD
and there are 24 of these short words.
I am matching these patterns to another file with 755795 lines (file1.txt).
I have this code for matching:
awk -v f2=file2.txt '
BEGIN {
while(... (2 Replies)
Discussion started by: heecha
2 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I have a flat file as below;
470423495|1||TSA-A000073800||1|||1
471423495|1||TSA-A000073800||5|||5
472423495|1||TSA-A000073800||2|||7
473423495|1||TSA-A000073800||3|||3
I like to create a Unix script.
The script have to valuate the last two columns, if the values are... (4 Replies)
Discussion started by: mrreds
4 Replies
6. Shell Programming and Scripting
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies
7. Shell Programming and Scripting
HI,
I have 2 text files. file1 and file2.
file1.txt (There are no duplicates in this file)
1234
3232
4343
3435
6564
6767
1213
file2.txt
1234,wq,wewe,qwqw
1234,as,dfdf,dfdf
4343,asas,sdds,dsds
6767,asas,fdfd,fdffd
I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
Discussion started by: Little
6 Replies
8. Shell Programming and Scripting
I am required to create a CSV file reading last 200000 lines form a log file. I have to grep 3 parameters from this log file and write these parameters in the .csv file, with time stamp. This script will be setup in a cron job which will run every 10 minutes. I have written the script but it is... (5 Replies)
Discussion started by: Crazy_Nix
5 Replies
9. UNIX for Dummies Questions & Answers
I have several problems with my problems: I hope you can help me.
1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error.
For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies
10. Shell Programming and Scripting
Hi ,
I'm trying to list the files and output is written to a file. But when I execute the command , the output file is being listed. How to exclude it ?
/tmp
file1.txt
file2.txt
ls -ltr |grep -v '-' | awk print {$9, $5} > output.txt
cat output.txt
file1.txt
file2.txt
output.txt (8 Replies)
Discussion started by: etldeveloper
8 Replies
FSEEK(3) 1 FSEEK(3)
fseek - Seeks on a file pointer
SYNOPSIS
int fseek (resource $handle, int $offset, [int $whence = SEEK_SET])
DESCRIPTION
Sets the file position indicator for the file referenced by $handle. The new position, measured in bytes from the beginning of the file,
is obtained by adding $offset to the position specified by $whence.
In general, it is allowed to seek past the end-of-file; if data is then written, reads in any unwritten region between the end-of-file and
the sought position will yield bytes with value 0. However, certain streams may not support this behavior, especially when they have an
underlying fixed size storage.
PARAMETERS
o $handle
-A file system pointer resource that is typically created using fopen(3).
o $offset
- The offset. To move to a position before the end-of-file, you need to pass a negative value in $offset and set $whence to
SEEK_END.
o $whence
-$whence values are:
o SEEK_SET - Set position equal to $offset bytes.
o SEEK_CUR - Set position to current location plus $offset.
o SEEK_END - Set position to end-of-file plus $offset.
RETURN VALUES
Upon success, returns 0; otherwise, returns -1.
EXAMPLES
Example #1
fseek(3) example
<?php
$fp = fopen('somefile.txt', 'r');
// read some data
$data = fgets($fp, 4096);
// move back to the beginning of the file
// same as rewind($fp);
fseek($fp, 0);
?>
NOTES
Note
If you have opened the file in append ( a or a+) mode, any data you write to the file will always be appended, regardless of the
file position, and the result of calling fseek(3) will be undefined.
Note
Not all streams support seeking. For those that do not support seeking, forward seeking from the current position is accomplished
by reading and discarding data; other forms of seeking will fail.
SEE ALSO
ftell(3), rewind(3).
PHP Documentation Group FSEEK(3)