So it is confirmed now that \r carriage characters are present in your Input_file, so could you please first remove them and then try your any of the code mentioned in POST#1 and let us know how it goes then.
Thanks,
R. Singh
can't figure out a way to delete multiple empty lines but keep single empty lines in a file, file is like this
#cat file
1
2
3
4
5
6
-
What I want is
1
2 (6 Replies)
I am attempting to delete blank lines in my file and I've used this command:
sed '/^$/d' $file > $file.fixed
all this seems to do is copy the file and not delete the blank lines located at the end of the file. Any assistance would be greatly appreciated. (3 Replies)
I have a file which contains blocks of text - each block is a multi-lines text delimited by blank lines eg.
<blank line>
several lines of text
...
pattern found on this line
several more lines of text
...
<blank line>
How do you delete the block of text (including the blank lines) when... (17 Replies)
Hi,
I am using BASH. How can I remove any lines in a text file that are either blank or begin with a # (ie. comments)? Thanks in advance.
Mike (3 Replies)
Hi,
I want to use diff to compare two files in a Perl file. But one of the files has some blank lines at the end. So I want to delete the blank lines from the file firstly and then use diff to compare them. But I dont know how to delete the blank lines from the files. Meanwhile, the system is... (5 Replies)
Hi,
Consider a file named "testfile"
The contents of file are as below
first line added for test
second line added for test
third line added for test
fourth line added for test
fifth line added for test (5 Replies)
Hi All,
I have a file.txt which seems like having three lines.
wc -l file.txt
3 file.txt
In fact, once it is open in text editor, this file has four lines where the last line is empty. how can i delete this last empty line of the file.txt? I tried the codes below so far but they... (6 Replies)
Hi All,
I have a file and I need to delete the lines that are blank and is starting with some characters below. Something like below:
Regular Ascii File:
Line1: AGODA1 BUSAN||SK Lord Beach 4/6/2012 4/7/2012 68060
Line2: AGODA2 BUSAN||SK Beach Hotel 4/6/2012 4/7/2012 610200
Line3: ... (4 Replies)
Hi Gurus,
Somebody can say me how to delete blank spaces and blank lines in a file unix, please.
Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies
LEARN ABOUT DEBIAN
locale::script
Locale::Script(3perl) Perl Programmers Reference Guide Locale::Script(3perl)NAME
Locale::Script - standard codes for script identification
SYNOPSIS
use Locale::Script;
$script = code2script('phnx'); # 'Phoenician'
$code = script2code('Phoenician'); # 'Phnx'
$code = script2code('Phoenician',
LOCALE_CODE_NUMERIC); # 115
@codes = all_script_codes();
@scripts = all_script_names();
DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924
four-letter codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are:
alpha
This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician.
This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA".
The Zxxx, Zyyy, and Zzzz codes are not used.
This is the default code set.
numeric
This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician.
This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC".
ROUTINES
code2script ( CODE [,CODESET] )
script2code ( NAME [,CODESET] )
script_code2code ( CODE ,CODESET ,CODESET2 )
all_script_codes ( [CODESET] )
all_script_names ( [CODESET] )
Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] )
Locale::Script::add_script ( CODE ,NAME [,CODESET] )
Locale::Script::delete_script ( CODE [,CODESET] )
Locale::Script::add_script_alias ( NAME ,NEW_NAME )
Locale::Script::delete_script_alias ( NAME )
Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Script::delete_script_code_alias ( CODE [,CODESET] )
These routines are all documented in the Locale::Codes man page.
SEE ALSO
Locale::Codes
Locale::Constants
http://www.unicode.org/iso15924/
Home page for ISO 15924.
AUTHOR
See Locale::Codes for full author history.
Currently maintained by Sullivan Beck (sbeck@cpan.org).
COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
Copyright (c) 2001-2010 Neil Bowers
Copyright (c) 2010-2011 Sullivan Beck
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-09-26 Locale::Script(3perl)