06-03-2008
For anything involving mainly the manipulation of files, external commands, or processes, I'd use Bash (or, more correctly, a shell script). For anything involving mainly the manipulation of structured data, I'd use Perl. For anything involving both, I'd use both (to the extent that the problem isn't so simple that you can handle it with sed or awk; and even then, Perl is often a good choice).
Perl has a lot of strengths specifically because it was designed as a glue language to "fill in the gaps" where system calls or data structures were not straightforward to handle with existing tools; arguably, the end result isn't always very elegant, but it often gets the job done where previously you would have had to resort to a small custom C program.
9 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
ehe may i know what are the difference between Unix & Linux, and what are the advantages of having Unix as well as disadvantages of having Unix or if u dun mind i am dumb do pls tell me what are the advantages as well as the disadvantages of having linux as well. thanks (1 Reply)
Discussion started by: cybertechmkteo
1 Replies
2. UNIX for Dummies Questions & Answers
Hello
to help me with my studying of unix/linux outside of work I was thinking of installing Linux at home aswell as using Windows XP.
Im pretty new to Linux and Unix, could someone tell me the possible benifits or even negatives of running Linux at home as an opperating system as opposed to... (2 Replies)
Discussion started by: Loaded Gun
2 Replies
3. UNIX for Dummies Questions & Answers
What are the advantages of putting users into groups? I understand that in a corporate environment, you should create a group for each department. ie: putting finance employees into a finance group.
But are there any system advantages for doing that? How would it make it easier on the system... (3 Replies)
Discussion started by: kurtmc
3 Replies
4. Shell Programming and Scripting
What is the advantages of Perl in Unix environnement.
Is it for scripts ? Text manipulation ?
Have you a Concrete exemple of perl utilisation.
Thanks you (3 Replies)
Discussion started by: simquest
3 Replies
5. Shell Programming and Scripting
Hi All,
I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl
FROM_DATE="06/05/2008"
TO_DATE="07/05/2008"
"perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename"
filename has... (10 Replies)
Discussion started by: arsidh
10 Replies
6. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies
7. UNIX for Dummies Questions & Answers
What are some advantage's of Unix (3 Replies)
Discussion started by: alvin2132
3 Replies
8. Shell Programming and Scripting
Can you explain what this line of script is doing.
What I have understood is :
-- variable C is the name of a software which is either not installed, so it must be installed or allready installed and then should be update if newer version found
-- branch B="$B $C" is to install the software
--... (4 Replies)
Discussion started by: jcdole
4 Replies
9. Solaris
Hi Guys,
Have you tried running Solaris 10 on Failsafe mode? What are their advantages and disadvantages?
What would you recommend for a roll-back plan in case something happens after failsafe mode?
I need to run on failsafe mode to be able to execute fsck.
Appreciate your kind... (1 Reply)
Discussion started by: bocha
1 Replies
LEARN ABOUT DEBIAN
tex::encode::bibtex
TeX::Encode::BibTeX(3pm) User Contributed Perl Documentation TeX::Encode::BibTeX(3pm)
NAME
TeX::Encode::BibTeX - Encode/decode Perl utf-8 strings into BibTeX
SYNOPSIS
use TeX::Encode;
use Encode;
$tex = encode('bibtex', "This will encode an e-acute (".chr(0xe9).") as 'e");
$str = decode('bibtex', $tex); # Will decode the 'e too!
DESCRIPTION
This module provides encoding to LaTeX escapes from utf8 using mapping tables in Pod::LaTeX and HTML::Entities. This covers only a subset
of the Unicode character table (undef warnings will occur for non-mapped chars). This module is intentionally vague about what it will
handle, see Caveats below.
Mileage will vary when decoding (converting TeX to utf8), as TeX is in essence a programming language, and this module does not implement
TeX.
I use this module to encode author names in BibTeX and to do a rough job at presenting LaTeX abstracts in HTML. Using decode rather than
seeing $sqrt{Omega^2zeta_n}$ you get something that looks like the formula.
The next logical step for this module is to integrate some level of TeX grammar to improve the decoding, in particular to handle fractions
and font changes (which should probably be dropped).
METHODS
TeX::Encode::BibTeX::encode STRING [, CHECK]
Encodes a utf8 string into TeX. CHECK isn't implemented.
TeX::Encode::BibTeX::encode_url STRING
Make a URL safe for inclusion in BibTeX.
TeX::Encode::BibTeX::decode STRING [, CHECK]
Decodes a TeX string into utf8. CHECK isn't implemented.
TeX::Encode::perlio_ok
Returns 0. PerlIO isn't implemented.
CAVEATS
Proper Encode checking is not implemented.
LaTeX comments (% ...) are ignored because chopping a lot of text may not be what you actually want.
encode()
Converts non-ASCII Unicode characters to their equivalent TeX symbols (unTeXable characters will result in undef warnings).
decode()
Attempts to convert TeX symbols (e.g. ae) to Unicode characters. As an experimental feature this also handles Math-mode TeX by inserting
HTML into the resulting string (so you end up with an HTML approximation of the maths - NOT MathML).
SEE ALSO
Encode::Encoding, Pod::LaTeX, Encode
AUTHOR
Timothy D Brody, <tdb01r@ecs.soton.ac.uk>
COPYRIGHT AND LICENSE
Copyright (C) 2005-2007 by Timothy D Brody
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or,
at your option, any later version of Perl 5 you may have available.
perl v5.12.4 2011-03-02 TeX::Encode::BibTeX(3pm)