Hi,
I am doing this perl script
print (@line(1..15));
the lines 1 to 15 get printed...
how can i redirect this to file?
thanks and regards
vivek.s (4 Replies)
I was simply trying to redirect some output in a log file but it foxed me.
truss a.out > log
It gave only the output of the a.out which was only a simple print "Hello"
Then I tried
truss a.out 2&1>a
echo `truss a.out` > a
All failed.
What am i missing.
Thanks (7 Replies)
hi all,
how to redirect the stdout msg in command line and file at the same time?
e.g
i got the script named test.sh, content as following:
#!/bin/sh
echo "111"
when i run the script ./test.sh > log.log, it will wirte the "111" into log.log, but how to show the "111" in command line... (2 Replies)
my querry is
suppose i have duplicate std i/p with FD-3 --exec 0<&3
now redirected std i/p to a file ----exec 0<file1
suppose i am reading the file line by line --while read LINE
cutting some fields and comparing it with a variable and if a match is found
... (0 Replies)
hi
i want a solution for the fallowing:
i am redirecting output from bash script in which we are running background commands like
./test.sh
contains
ls -l &
ps
when we do as
./test.sh 1> test.txt 2>&1
but test.txt not containing output as ls -l and ps.
it showing ls -l, ps and... (2 Replies)
Hi all,
Maybe someone is able to help:
Need to redirect the output of a command in realtime to a second command. Command-A executes a remote shell to another host, and outputs its results. Command-B displays a "dialog" with the outputs of Command-A.
Command-A Output:
Updating FileA... (2 Replies)
Hi,
I have to migrate Korn Shell who call Sybase command into Oracle Command.
I have a problem on this example :
DATNUM=$(
sqlplus -S SA/SASASA@MIGGVDEV <<!
SET FEEDBACK OFF;
SET HEADING OFF;
select sybase_utilities.datediff('DAY', '01/01/1900', '01/01/2000') from... (4 Replies)
Hi All,
i m facing very strange problem . like suppose i am in one directory and then i type ls
it will display the content of directory then i redirect the output as
sneha-pardus $ ls > test
sneha-pardus $ cat test
a.sh b.sh c.sh
sneha-pardus $ awk ' { print $1 } ' test > test... (3 Replies)
I almost reach my objective (Youhouuu !!!!)
But I really don't understand why it doesn't work until the end... :wall:
For clarity's sake I am taking a very simple example. The operations I am doing in the script (gsub and print) really don't have any importance !!! I just matter about... (10 Replies)
I've got a problem with file redirection in bash, in loop while (in my script done < bufor.txt). In every consecutive iteration there's a possibility that to the bufor.txt will be added some lines. Unfortunately, in loop, added lines are ignored (for example: bufor.txt has 5 lines, in 3rd iteration... (4 Replies)
Discussion started by: kk9
4 Replies
LEARN ABOUT MOJAVE
encode::detect::detector
Encode::Detect::Detector(3) User Contributed Perl Documentation Encode::Detect::Detector(3)NAME
Encode::Detect::Detector - Detects the encoding of data
SYNOPSIS
use Encode::Detect::Detector;
my $charset = detect($octets);
my $d = new Encode::Detect::Detector;
$d->handle($octets);
$d->handle($more_octets);
$d->end;
my $charset = $d->getresult;
DESCRIPTION
This module provides an interface to Mozilla's universal charset detector, which detects the charset used to encode data.
METHODS
$charset = Encode::Detect::Detector->detect($octets)
Detect the charset used to encode the data in $octets and return the charset's name. Returns undef if the charset cannot be determined
with sufficient confidence.
$d = Encode::Detect::Detector->new()
Creates a new "Encode::Detect::Detector" object and returns it.
$d->handle($octets)
Provides an additional chunk of data to be examined by the detector. May be called multiple times.
Returns zero on success, nonzero if a memory allocation failed.
$d->eof
Informs the detector that there is no more data to be examined. In many cases, this is necessary in order for the detector to make a
decision on the charset.
$d->reset
Resets the detector to its initial state.
$d->getresult
Returns the name of the detected charset or "undef" if no charset has (yet) been decided upon. May be called at any time.
SEE ALSO
Encode::Detect
AUTHOR
John Gardiner Myers <jgmyers@proofpoint.com>
SUPPORT
For help and thank you notes, e-mail the author directly. To report a bug, submit a patch, or add to the wishlist please visit the CPAN
bug manager at: http://rt.cpan.org
perl v5.18.2 2017-10-06 Encode::Detect::Detector(3)