10-30-2013
Thank you guys. This is very helpful.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Currently iam going to migrate some of the ksh scripts from HPUX to LINUX.
Will there be any major change in scripts which I have to take care for migration?
Appreciate some help on this.
Thanks
Om (1 Reply)
Discussion started by: Omkumar
1 Replies
2. Shell Programming and Scripting
user_account()
{
set -x
nodename=$1
# set userid to user0
userid="user0"
echo outside:pid $$
cat $MY_DIR/user_accounts | while read line
do
# line="node1 user1"
echo inside do: pid $$ line:$line userid:$userid
poss_node=`echo $line |awk '{print $1}'`... (2 Replies)
Discussion started by: jasmeet100
2 Replies
3. Shell Programming and Scripting
Hi,
I need to cut filename in Linux ksh.
for example file name is c_xxxx_cp_200908175035.zip. I need to get variable with only c_xxxx_cp value. (10 Replies)
Discussion started by: juliyp
10 Replies
4. Shell Programming and Scripting
Guys,
I would like to discuss the problem I am seeing with echo “\n” statement in Redhat Linux Enterprise 5.3 version. I have a shell script that was written couple of years back for generic UNIX platforms based on ksh and was tested on Solaris 8,9,10 ; AIX 5.3 and Red Hat Enterprise Linux... (5 Replies)
Discussion started by: rijeshpp
5 Replies
5. Shell Programming and Scripting
Hello,
I'm trying to create a muliti value shell variable with newlines inside it, So that I can read the values of that variable individually line by line, but KSH seems to be stripping my variable of newlines in LINUX, but UNIX its working fine.
Here's Example :
String =... (3 Replies)
Discussion started by: Sanju1236
3 Replies
6. Linux
Clear in Linux
#!/usr/bin/ksh
am using clear in the script, but it is not working,
it gives an error as follows,
'xterm': unknown terminal type.
please help out.:confused:
---------- Post updated at 01:19 PM ---------- Previous update was at 12:01 PM ----------
if
then
... (2 Replies)
Discussion started by: pradebban
2 Replies
7. Shell Programming and Scripting
Overview:
I have an AWK program that parses thru a database backup
server log file and outputs ths following parameters
SRNO DATE : TIME SIZE IN(KB) DATABASE NAME DUMP TYPE
1 May 16 2012: 13:30:00 6874 TestDB database
2 May 16 2012: 13:30:44 11462 master database
Problem:
This program has... (5 Replies)
Discussion started by: JolietJake
5 Replies
8. Shell Programming and Scripting
We are migrating some scripts (ksh) from Solaris 10 to Linux 2.6.32.
Can someone share list of changes i need to take care for this ?
Have found few of them but i am looking for a exhaustive list.
Thanks. (6 Replies)
Discussion started by: Shivdatta
6 Replies
9. Red Hat
I am Not sure why following script is not capturing the counts only when using crontab !! when I run it fromt he command line it is fine ! what is missing here !
#!/usr/bin/ksh
host=`uname -n`
tdate=`date`
userid='dbid/password'
totalevents=`sqlplus -s $userid << -
set timing off
... (1 Reply)
Discussion started by: mrn6430
1 Replies
10. Shell Programming and Scripting
I have a ksh shell script and i need to pass arguments which are generated by data pulled from a database.
When the argument to the shell script is too long (about 4000 charecters) the below is the issue observed.
I copy the command which is 4000 charecters long from the logs and paste it... (7 Replies)
Discussion started by: mohtashims
7 Replies
LEARN ABOUT DEBIAN
marc::charset
MARC::Charset(3pm) User Contributed Perl Documentation MARC::Charset(3pm)
NAME
MARC::Charset - convert MARC-8 encoded strings to UTF-8
SYNOPSIS
# import the marc8_to_utf8 function
use MARC::Charset 'marc8_to_utf8';
# prepare STDOUT for utf8
binmode(STDOUT, 'utf8');
# print out some marc8 as utf8
print marc8_to_utf8($marc8_string);
DESCRIPTION
MARC::Charset allows you to turn MARC-8 encoded strings into UTF-8 strings. MARC-8 is a single byte character encoding that predates
unicode, and allows you to put non-Roman scripts in MARC bibliographic records.
http://www.loc.gov/marc/specifications/spechome.html
EXPORTS
ignore_errors()
Tells MARC::Charset whether or not to ignore all encoding errors, and returns the current setting. This is helpful if you have records
that contain both MARC8 and UNICODE characters.
my $ignore = MARC::Charset->ignore_errors();
MARC::Charset->ignore_errors(1); # ignore errors
MARC::Charset->ignore_errors(0); # DO NOT ignore errors
assume_unicode()
Tells MARC::Charset whether or not to assume UNICODE when an error is encountered in ignore_errors mode and returns the current setting.
This is helepfuli if you have records that contain both MARC8 and UNICODE characters.
my $setting = MARC::Charset->assume_unicode();
MARC::Charset->assume_unicode(1); # assume characters are unicode (utf-8)
MARC::Charset->assume_unicode(0); # DO NOT assume characters are unicode
assume_encoding()
Tells MARC::Charset whether or not to assume a specific encoding when an error is encountered in ignore_errors mode and returns the current
setting. This is helpful if you have records that contain both MARC8 and other characters.
my $setting = MARC::Charset->assume_encoding();
MARC::Charset->assume_encoding('cp850'); # assume characters are cp850
MARC::Charset->assume_encoding(''); # DO NOT assume any encoding
marc8_to_utf8()
Converts a MARC-8 encoded string to UTF-8.
my $utf8 = marc8_to_utf8($marc8);
If you'd like to ignore errors pass in a true value as the 2nd parameter or call MARC::Charset->ignore_errors() with a true value:
my $utf8 = marc8_to_utf8($marc8, 'ignore-errors');
or
MARC::Charset->ignore_errors(1);
my $utf8 = marc8_to_utf8($marc8);
utf8_to_marc8()
Will attempt to translate utf8 into marc8.
my $marc8 = utf8_to_marc8($utf8);
If you'd like to ignore errors, or characters that can't be converted to marc8 then pass in a true value as the second parameter:
my $marc8 = utf8_to_marc8($utf8, 'ignore-errors');
or
MARC::Charset->ignore_errors(1);
my $utf8 = marc8_to_utf8($marc8);
DEFAULT CHARACTER SETS
If you need to alter the default character sets you can set the $MARC::Charset::DEFAULT_G0 and $MARC::Charset::DEFAULT_G1 variables to the
appropriate character set code:
use MARC::Charset::Constants qw(:all);
$MARC::Charset::DEFAULT_G0 = BASIC_ARABIC;
$MARC::Charset::DEFAULT_G1 = EXTENDED_ARABIC;
SEE ALSO
o MARC::Charset::Constant
o MARC::Charset::Table
o MARC::Charset::Code
o MARC::Charset::Compiler
o MARC::Record
o MARC::XML
AUTHOR
Ed Summers (ehs@pobox.com)
perl v5.12.4 2011-08-05 MARC::Charset(3pm)