Sponsored Content
Full Discussion: Perl...getting wrong output?
Top Forums Shell Programming and Scripting Perl...getting wrong output? Post 302398113 by bigben1220 on Wednesday 24th of February 2010 12:18:33 AM
Old 02-24-2010
Thanks so much for the explaination!!! You rock!~
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sort command giving wrong output

Hi all, I have a problem with sort command. i have a file which looks like this: "file1 1073 java/4 1073 java/180 1073 java/170 1073 java/176 1073 java/167 1073 java/40 1073 java/33 1073 java/136 28988 java/76 28988 java/73 28988 java/48 28988 java/26" and i want to sort... (8 Replies)
Discussion started by: usha rao
8 Replies

2. Shell Programming and Scripting

tr command giving wrong output

Hi All, i have a file which have many fields delimited by ,(comma) now i have to show only few fields and not all. the sample text file looks like this: TYPE=SERVICEEVENT, TIMESTAMP=05/06/2009 11:01:40 PM, HOST=sppwa634, APPLICATION=ASComp, FUNCTION=LimitsService, SOU... (8 Replies)
Discussion started by: usha rao
8 Replies

3. Shell Programming and Scripting

wrong output in perl script

Hi, Here is my piece of code-- #!/usr/bin/perl my $Time_Stamp ; my $User_Name; my $Success; my $Failure; my $ErrorCode; my $ErrorMsg; my $logDir = $ARGV; my $logPrefix = $ARGV; die "usage: $0 <logDir> <logPrefix>" unless $logDir and $logPrefix; die "Log dir $logDir doesn't... (2 Replies)
Discussion started by: namishtiwari
2 Replies

4. Emergency UNIX and Linux Support

getting wrong output with AWK command!!!

i have a file which gets appended with 9 records daily and the file keeps growing from then...i use to store the previous day files count in a variable called oldfilecount and current files count as newfilecount.my requirement is that i need to start processing only the new records from the... (3 Replies)
Discussion started by: ganesh_248
3 Replies

5. Shell Programming and Scripting

Wrong output in find command

Hi guys - I am trying a small script to tell me if there is a file that exists less than 1k. It should report ERROR, otherwise the check is good. I wrote this script down, however it never runs in the if/then statement. It always returns the echo ERROR. MYSIZE=$(find /home/student/dir1... (8 Replies)
Discussion started by: DallasT
8 Replies

6. Shell Programming and Scripting

What is wrong with my perl script?

i managed to write a perl script for nagios. now, the script works. but i think there's somethign wrong with the exit codes. because the script doesn't show the output of the results in nagios, it instead shows null. please tell me what i'm doing wrong here: #!/usr/local/bin/perl use... (2 Replies)
Discussion started by: SkySmart
2 Replies

7. Shell Programming and Scripting

Wrong output when run via Cron

Hello, This may be a simple one, but i can't see what the issue is. When i run the script via CLI, then i get the correct output via the if statement, but when i run via CRON i get the wrong statement. echo " Checking Job Status" >> $DIR/Bpimagecleanup_$DATE... (3 Replies)
Discussion started by: Junes
3 Replies

8. Shell Programming and Scripting

Output, working with files. What is wrong?

I cannot figure out what is wrong.... I have 3 files with IP addresses: file1 134.123.3.236 file2 134.123.3.235 file3 134.123.5.237 I type "prob1 Oops x2x3x4". Then my code creates file with name Oops and first line x2x3x4. Moreover, my code generate IP and it gives to file Oops as a second... (8 Replies)
Discussion started by: Manu1234567
8 Replies

9. Shell Programming and Scripting

Script Output coming in wrong format....

Hi team, getting output logs wrong in different format from telnet script ... getting Output.txt macro_outdoor_dist-6.0.0(v4_0_2) DN:1.3.903 (1101:100:11w:500:3:2:103:aa) macro_outdoor_dist-8.1.0(v3_1_0) DN:1.3.409 (N/A)... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies

10. Shell Programming and Scripting

Wrong output when writing to file

Hello, I am having problem while redirecting output to a file where as on console output is proper. for dir in */; do printf "%s, " "$dir"; ls -m "$dir"; echo; done > output.txt Output of above command is coming in single line but when i am redirecting output to a file, single line i... (10 Replies)
Discussion started by: Manoj Rajput
10 Replies
CDDB::File(3pm) 					User Contributed Perl Documentation					   CDDB::File(3pm)

NAME
CDDB::File - Parse a CDDB/freedb data file SYNOPSIS
my $disc = CDDB::File->new("rock/f4109511"); print $disc->id, $disc->all_ids; print $disc->artist, $disc->title; print $disc->year, $disc->genre, $disc->extd; print $disc->length, $disc->track_count; print $disc->revision, $disc->submitted_via, $disc->processed_by; foreach my $track ($disc->tracks) { print $track->number, $track->title, $track->artist; print $track->length, $track->extd; } DESCRIPTION
This module provides an interface for extracting data from CDDB-format data files, as used by freedb. It does not read data from your CD, or submit information to freedb. METHODS
new my $disc = CDDB::File->new("rock/f4109511"); This will create a new object representing the data in the file name specified. id / all_ids my $discid = $disc->id; my @discid = $disc->all_ids; Due to how freedb works, one CD may have several IDs associated with it. 'id' will return the first of these (not necessarily related to the filename from which this was read), whilst 'all_ids' will return all of them. title / artist The title and artist of this CD. For eponymous CDs these will be identical, even if the data file leaves the artist field blank. year The (4-digit) year of release. genre The genre of this CD. This is the genre as stored in the data file itself, which is not related to the 11 main freedb genres. extd The "extended data" for the CD. This is used for storing miscellaneous information which has no better storage place, and can be of any length. length The run time of the CD in seconds. track_count The number of tracks on the CD. revision Each time information regarding the CD is updated this revision number is incremented. This returns the revision number of this version. processed_by / submitted_via The software which submitted this information to freedb and which processed it at the other end. tracks foreach my $track ($disc->tracks) { print $track->number, $track->title, $track->artist; print $track->length, $track->extd; } Returns a list of Track objects, each of which knows its number (numering from 1), title, length (in seconds), offset, and may also have extended track data. Tracks may also contain an 'artist' field. If this is not set the artist method will return the artist of the CD. SEE ALSO
http://www.freedb.org/ AUTHOR
Tony Bowden BUGS and QUERIES Please direct all correspondence regarding this module to: bug-CDDB-File@rt.cpan.org COPYRIGHT
Copyright (C) 2001-2005 Tony Bowden. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. perl v5.10.1 2005-10-04 CDDB::File(3pm)
All times are GMT -4. The time now is 03:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy