Sponsored Content
Top Forums Shell Programming and Scripting To search distinct special char in file Post 302849927 by ahamed101 on Tuesday 3rd of September 2013 03:46:38 PM
Old 09-03-2013
Code:
awk -F\| '{gsub(/[a-zA-Z0-9]/,"",$4)}!c[$4]++{print $4}' infile

--ahamed
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search special characters in a file

Hello I am new to shell scripting and can anyone tell me how to check if there are any special characters in a file. Can i use grep ? thanks susie (2 Replies)
Discussion started by: cramya80
2 Replies

2. UNIX for Advanced & Expert Users

Using egrep to search for Text and special char

Anyone is well-versed to use egrep to search a file for a line containing both: 1) AAA 2) $ I am having problem escaping the dollar sign when using egrep in conjunction with satisfying AAA as well. E.g. Text file Line 1 AAA Line 2 $$$ Line 3 AAA BBB $ Line 4 $$$ BBB AA will return me... (2 Replies)
Discussion started by: izy100
2 Replies

3. Shell Programming and Scripting

Special Char in Multiple Files

We develop a file in windows and move to unix box as a part of deployment. When we do this, we get ctrl-M(^M) character added to the file. So we need to remove ctrl-M(^M) character from all the files from deployment folder and all subfolders folder. Currently we move to individual folders and... (5 Replies)
Discussion started by: thinakarmani
5 Replies

4. UNIX for Dummies Questions & Answers

How to copy/move to a file with a special character as the 1st char in the filename?

I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell. I am able to create files with special characters in the filenames...e.g. cp -pv foo.gif \*special.gif cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies

5. Shell Programming and Scripting

Special Char in Data file

Hi All, I have a data file in UNIX which i am trying to load into Oracle table using Oracle SQL Loader. The problem is, one of the filed contains special character (ex: Square). And due to this reason, my script fails. Could you please let me know, how to identify which character is... (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies

6. Shell Programming and Scripting

Remove special char from end of the file

Hi I am working on a bash script and would know how to use cut or sed to remove (F/.M/d h) from a text file. Before 1 text to save (F/.M/d h) after 1 text to save Thanks in advance (5 Replies)
Discussion started by: pelle
5 Replies

7. Shell Programming and Scripting

Search distinct files

Hello , Can anyone help me with my below query I am trying to find a text in directory of files via below command grep -i cmps_cgs_crs_rfnc_id * But it returns multiple times same file name i.e if the text found in a file 4 times the file name shown 4 times in the o/p Is... (1 Reply)
Discussion started by: Pratik4891
1 Replies

8. Shell Programming and Scripting

Split a special char

Hello, I have some data in output file.In that i need to split the special char "(" and ")" and store it. This is example of o/p file. (OHC12345) (OHC12415) (OHC12765) (OHC12545) I need like OHC12345 OHC12415 OHC12765 OHC12545 --Thanks (5 Replies)
Discussion started by: rasingraj
5 Replies

9. Programming

Special char in a buffer

Hello, Please ,how can verify, if a case of buffer contains a special char ? (in C) Thank you. (3 Replies)
Discussion started by: chercheur857
3 Replies

10. Shell Programming and Scripting

To search null and char in file

Hi guys, I want to know how i can search null value and character value in a feed file. my file has Pipe delimted records. for eg: 1|12|xxx|yyy . . . N records I know the the which column null and char occurs does it has for eg 3rd column which i can obtain by awk $3 and (7 Replies)
Discussion started by: rohit_shinez
7 Replies
HTML::FormatText(3pm)					User Contributed Perl Documentation				     HTML::FormatText(3pm)

NAME
HTML::FormatText - Format HTML as plaintext VERSION
version 2.10 SYNOPSIS
use HTML::TreeBuilder; $tree = HTML::TreeBuilder->new->parse_file("test.html"); use HTML::FormatText; $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50); print $formatter->format($tree); or, more simply: use HTML::FormatText; my $string = HTML::FormatText->format_file( 'test.html', leftmargin => 0, rightmargin => 50 ); DESCRIPTION
HTML::FormatText is a formatter that outputs plain latin1 text. All character attributes (bold/italic/underline) are ignored. Formatting of HTML tables and forms is not implemented. HTML::FormatText is built on HTML::Formatter and documentation for that module applies to this - especially "new" in HTML::Formatter, "format_file" in HTML::Formatter and "format_string" in HTML::Formatter. You might specify the following parameters when constructing the formatter: leftmargin (alias lm) The column of the left margin. The default is 3. rightmargin (alias rm) The column of the right margin. The default is 72. SEE ALSO
HTML::Formatter INSTALLATION
See perlmodinstall for information and options on installing Perl modules. BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format <http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format>. AVAILABILITY
The project homepage is http://search.cpan.org/dist/HTML-Format <http://search.cpan.org/dist/HTML-Format>. The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you, or see http://search.cpan.org/dist/HTML-Format/ <http://search.cpan.org/dist/HTML-Format/>. The development version lives at http://github.com/nigelm/html-format <http://github.com/nigelm/html-format> and may be cloned from git://github.com/nigelm/html-format.git <git://github.com/nigelm/html-format.git>. Instead of sending patches, please fork this project using the standard git and github infrastructure. AUTHORS
o Nigel Metheringham <nigelm@cpan.org> o Sean M Burke <sburke@cpan.org> o Gisle Aas <gisle@ActiveState.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.4 2011-07-26 HTML::FormatText(3pm)
All times are GMT -4. The time now is 06:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy