Dear All,
To find the length of the longest line from a file i have used wc -L which is giving the proper output...
But the problem is AIX os does not support wc -L command.
so is there any other way 2 to find out the length of the longest line using awk or sed ?
Regards,
Pankaj (1 Reply)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Hello all,
I need to find the longest string in a select field and print that field.
I have tried a few different methods and I always end up one step from where I need to be.
Methods thus far:
nawk '{if (length($1) > long) long=length($1); if(length($1)==long) print $1}'
The above... (6 Replies)
Hi All
I want to take a Hexadecimal number as input and i want to find lenth of the input and pass it to char s ( char s ). I have a program to convert hexadecial to binary but it is taking limited input but i want to return binary number based on input. How? (1 Reply)
Hi Guys,
I was going some trial and error to see if I can find the longest word in a text.
I was using Pipes because they are easier to use in this case.
I was stuck on this for a while so I thought I'll get some help with it.
I tried this code to separate all the words in a text in... (4 Replies)
I met a challenge to filter ~70 millions of sequence rows and I want using awk with conditions:
1) longest string of each pattern in column 2, ignore any sub-string, as the index;
2) all the unique patterns after 1);
3) print the whole row;
input:
1 ABCDEFGHI longest_sequence1
2 ABCDEFGH... (12 Replies)
Hello All,
I have this script that does stuff like "starting, stopping & restarting" a Daemon Process running on my machine...
My main question is why in part of my code (which you will see below) does the Array Length (i.e. ${#PIDS} )
return "1" when I know the Array is empty..?
Here is... (17 Replies)
Hi,
I am trying to figure out how to get the length of the longest column in the entire file (because the length varies from one row to the other)
I was doing this at first to check how many fields I have for the first row:
awk '{print NF; exit}' file
Now, I can do this:
awk '{ if... (4 Replies)
Running below line gives 3957 as length of longest line in file 20121119_SRMNotes_init.dat
awk ' { if ( length > 3950 ) { x = length } }END{ print x }' 20121119_SRMNotes_init.dat
While wc -L 20121119_SRMNotes_init.dat gives output as 4329. Why is there a difference between these two commands.... (2 Replies)
Hello experts,
I am trying to unscramble a mixed signal into component signals.
Let the list of known signals be
$ cat tmplist
DU
DU4016
GFF
GFF2010
GFF201019
G2115
G211
DU40 (1 Reply)
Discussion started by: senhia83
1 Replies
LEARN ABOUT CENTOS
date::language::bulgarian
Date::Language::Bulgarian(3) User Contributed Perl Documentation Date::Language::Bulgarian(3)NAME
Date::Language::Bulgarian - localization for Date::Format
DESCRIPTION
This is Bulgarian localization for Date::Format. It is important to note that this module source code is in utf8. All strings which it
outputs are in utf8, so it is safe to use it currently only with English. You are left alone to try and convert the output when using
different Date::Language::* in the same application. This should be addresed in the future.
SYNOPSIS
use strict;
use warnings;
use Date::Language;
local $=$/;
my $template ='%a %b %e %T %Y (%Y-%m-%d %H:%M:%S)';
my $time=1290883821; #or just use time();
my @lt = localtime($time);
my %languages = qw(English GMT German EEST Bulgarian EET);
binmode(select,':utf8');
foreach my $l(keys %languages){
my $lang = Date::Language->new($l);
my $zone = $languages{$l};
print $/. "$l $zone";
print $lang->time2str($template, $time);
print $lang->time2str($template, $time, $zone);
print $lang->strftime($template, @lt);
}
AUTHOR
Krasimir Berov (berov@cpan.org)
COPYRIGHT
Copyright (c) 2010 Krasimir Berov. This program is free software; you can redistribute it and/or modify it under the same terms as Perl
itself.
perl v5.16.3 2010-12-15 Date::Language::Bulgarian(3)