Sponsored Content
Top Forums Shell Programming and Scripting Perl script to delimit size of strings Post 302600938 by bartus11 on Wednesday 22nd of February 2012 12:35:55 PM
Old 02-22-2012
Try:
Code:
perl -nle 'print if length()>2&&length()<21' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ideas for perl script - strings,conditionals..etc

I have a matrix , how do I compare all the elements of a column , lets say I want to check if the columns contain the alphabets "S","H","A","R","A","T". and not "X"s. Lets say matrix looks something like this .. SSSXSH HHXXHA AAXXAT RRRXRS AAXTAR TTTTTA I can hard code it where... (4 Replies)
Discussion started by: sharatz83
4 Replies

2. Shell Programming and Scripting

Can we pass an array of strings from a Perl Program to a Shell Script?

Hi Folks, The subject is my question: Can we pass an array of strings from a Perl Program to a Shell Script? Please provide some sample code. Thanks ---------- Post updated at 11:52 PM ---------- Previous update was at 11:43 PM ---------- I got it. Its here:... (0 Replies)
Discussion started by: som.nitk
0 Replies

3. Shell Programming and Scripting

FTP Perl Script File Size Mismatch.

Hello, I've written a Perl script that copies a set of files from one server to another. Prior to transferring a file the script gets the file size from the source system and compares this to the file size received in the target system. Except that the file sizes are slightly different. ... (1 Reply)
Discussion started by: mbb
1 Replies

4. Shell Programming and Scripting

Perl Script to check file date and size

Hi guys, i am new to perl. I started reading the perl documents and try to come up with some logic. I am trying to create a script that would go into a location, search for todays files, then searches for all .txt files from today. If todays not found, its an error If file size is less... (26 Replies)
Discussion started by: DallasT
26 Replies

5. Shell Programming and Scripting

Replacing strings in perl script

HI all, These are examples of the original value from a variable $abc can be FastEthernet1/0 GigabitEthernet3/1 Serial1/0 If $abc is FastEthernet*/* (where * can be any number), replace $abc value to fa*/* (same number as the original value). GigabitEthernet becomes ga*/* and Serial... (2 Replies)
Discussion started by: tententen
2 Replies

6. UNIX for Advanced & Expert Users

Delimit the Folder Size come under Webapps dir

Hi all, Great thanks to all for support till today..today i came here for 1 new issue :-( in our organization we are developing a job portal web application for a client. using Apache-tomcat we are hosting this application, now i need to delimit the applications directory comer under the webapps... (1 Reply)
Discussion started by: anishkumarv
1 Replies

7. Shell Programming and Scripting

script in perl for removing strings between a file

I have file that looks like: ATOM 2517 O VAL 160 8.337 12.679 -2.487 ATOM 2518 OXT VAL 160 7.646 12.461 -0.386 TER ATOM 2519 N VAL 161 -14.431 5.789 -25.371 ATOM 2520 H1 VAL 161 -15.336 5.698 -25.811 ATOM 2521 H2 VAL 161 -13.416 10.529 17.708 ATOM 2522 H3 VAL 161 -14.363 ... (4 Replies)
Discussion started by: kanikasharma
4 Replies

8. Shell Programming and Scripting

Output after a perl script gives a file with size zero.

Hi, I have a unix shell script which generates a flat file after connecting to Teradata servers to fetch tables and views and also picks up modified unix scripts from the specified paths. Later on the script calls a perl script to assign a value based on the type of object in the flat file which... (2 Replies)
Discussion started by: yohasini
2 Replies

9. Programming

Perl script to merge cells in column1 which has same strings, for all sheets in a excel workbook

Perl script to merge cells ---------- Post updated at 12:59 AM ---------- Previous update was at 12:54 AM ---------- I am using below code to read files from a dir and print to excel. open(my $in, '<', $file) or die "Could not open file: $!"; my $rowCount = 0; my $colCount = 0;... (11 Replies)
Discussion started by: Jack_Bruce
11 Replies

10. Shell Programming and Scripting

Perl script to find process and exclude strings from the output

Hi team, I'm a newbie of Perl Script and looking to create a simple perl script that will run in the Linux system: 1) to find process, such as ps -ef | grep process name 2) to exclude strings from the output if it found, for instance if i see abc from usr process, then will exclude it from... (1 Reply)
Discussion started by: hoffman2503
1 Replies
IDNA::Punycode(3pm)					User Contributed Perl Documentation				       IDNA::Punycode(3pm)

NAME
IDNA::Punycode - encodes Unicode string in Punycode SYNOPSIS
use IDNA::Punycode; idn_prefix('xn--'); $punycode = encode_punycode($unicode); $unicode = decode_punycode($punycode); DESCRIPTION
IDNA::Punycode is a module to encode / decode Unicode strings into Punycode, an efficient encoding of Unicode for use with IDNA. This module requires Perl 5.6.0 or over to handle UTF8 flagged Unicode strings. FUNCTIONS
This module exports following functions by default. encode_punycode $punycode = encode_punycode($unicode); takes Unicode string (UTF8-flagged variable) and returns Punycode encoding for it. decode_punycode $unicode = decode_punycode($punycode) takes Punycode encoding and returns original Unicode string. idn_prefix idn_prefix($prefix); causes encode_punycode() to add $prefix to ACE-string after conversion. As a side-effect decode_punycode() will only consider strings beginning with $prefix as punycode representations. According to RFC 3490 the ACE prefix "xn--" had been chosen as the standard. Thus, "xn--" is also the default ACE prefix. For compat- ibility I'm leaving idn_prefix() in the module. Use "idn_prefix(undef)" to get the old behaviour. These functions throws exceptionsn on failure. You can catch 'em via "eval". AUTHORS
Tatsuhiko Miyagawa <miyagawa@bulknews.net> is the original author and wrote almost all the code. Robert Urban <urban@UNIX-Beratung.de> added "idn_prefix()". This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
http://www.ietf.org/internet-drafts/draft-ietf-idn-punycode-01.txt Encode::Punycode perl v5.8.8 2005-09-01 IDNA::Punycode(3pm)
All times are GMT -4. The time now is 02:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy