Hi,
I just wandering how to split a record which has more than one delimiter,
i have a file which contains pattern as group separtor and ~ as field separtor, Ultimately I need consider even the groups as a field, So i need to make this multi-delimited file into ~ delimited file.
My record... (4 Replies)
hi, pls someone tell me how to extract delimiters from any file and pass it to a unix script.since, im a beginner in unix i find it little bit difficult.how to use awk to do this? (9 Replies)
Hi
I have a file in which delimiter is ';'
However if the delimiter is within "" it is a part of the string and not delimiter.
How to get the fields ? I want to replace the delimiter ';' to '|'.
The file contains data like this :
11111; “2222 2222”; “3333; 3333”; “4444 ""44444”
The file... (2 Replies)
Hello,
I am trying to find the record count in a specific folder,
Here is the part of the code
===========================
STARTDATE=`date +"%y%m%d%H%M"`
for i in `ls *.DAT`
do
wc -l $i >> /XYZ/SrcFiles/"Record_counts"$STARTDATE.csv
... (2 Replies)
Hi All,
I woul like to know with out opening a file in unix ,how we can find out what is the delemeter in that file...
Thanks..
edit by bakunin: changed thread title to "delimiter" so it can be found. (4 Replies)
Hi there,
I am with this one column input text file to change layout, please help. Thanks. I have awk, sed.
$ cat input
Median
1.0
2.3
3.0
Median
35.0
26.3
45.7
10.1
63.1
Median
1.2
2.3 (8 Replies)
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Hi,
I have a input
/dev/cm/test1.txt
/qa/tm/hmkr/cc/test2.txt
and I need an out like below
foldername, filename
/dev/cm/,test1.txt
/qa/tm/hmkr/cc/,test2.txt
I tried with awk $NF, but I'm getting the filenames and not folder names. Please let me know how to achive the above... (5 Replies)
Hi,
Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV
I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters.
Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
LEARN ABOUT OSX
io::seekable
IO::Seekable(3pm) Perl Programmers Reference Guide IO::Seekable(3pm)NAME
IO::Seekable - supply seek based methods for I/O objects
SYNOPSIS
use IO::Seekable;
package IO::Something;
@ISA = qw(IO::Seekable);
DESCRIPTION
"IO::Seekable" does not have a constructor of its own as it is intended to be inherited by other "IO::Handle" based objects. It provides
methods which allow seeking of the file descriptors.
$io->getpos
Returns an opaque value that represents the current position of the IO::File, or "undef" if this is not possible (eg an unseekable
stream such as a terminal, pipe or socket). If the fgetpos() function is available in your C library it is used to implements getpos,
else perl emulates getpos using C's ftell() function.
$io->setpos
Uses the value of a previous getpos call to return to a previously visited position. Returns "0 but true" on success, "undef" on
failure.
See perlfunc for complete descriptions of each of the following supported "IO::Seekable" methods, which are just front ends for the
corresponding built-in functions:
$io->seek ( POS, WHENCE )
Seek the IO::File to position POS, relative to WHENCE:
WHENCE=0 (SEEK_SET)
POS is absolute position. (Seek relative to the start of the file)
WHENCE=1 (SEEK_CUR)
POS is an offset from the current position. (Seek relative to current)
WHENCE=2 (SEEK_END)
POS is an offset from the end of the file. (Seek relative to end)
The SEEK_* constants can be imported from the "Fcntl" module if you don't wish to use the numbers 0 1 or 2 in your code.
Returns 1 upon success, 0 otherwise.
$io->sysseek( POS, WHENCE )
Similar to $io->seek, but sets the IO::File's position using the system call lseek(2) directly, so will confuse most perl IO operators
except sysread and syswrite (see perlfunc for full details)
Returns the new position, or "undef" on failure. A position of zero is returned as the string "0 but true"
$io->tell
Returns the IO::File's current position, or -1 on error.
SEE ALSO
perlfunc, "I/O Operators" in perlop, IO::Handle IO::File
HISTORY
Derived from FileHandle.pm by Graham Barr <gbarr@pobox.com>
perl v5.16.2 2012-08-26 IO::Seekable(3pm)