Sponsored Content
Top Forums Shell Programming and Scripting shell script equivalent for tcl function Post 302263096 by reborg on Sunday 30th of November 2008 04:55:59 PM
Old 11-30-2008
With ksh93:

Code:
netmask=255.255.0.0
hexnetmask=$(printf "%02X%02X%02X%02X" ${netmask//./ })

alternative / ksh88:

Code:
netmask=255.255.0.0
hexnetmask=$(echo $netmask | awk -F'.' '{printf "%02X%02X%02X%02X", $1, $2,$3, $4}')

 

10 More Discussions You Might Find Interesting

1. Linux

Equivalent function of [ kbhit() ] In TURBO C

ANy one knows equivalent function of which in Turbo C. I want to Execute Certain loop until any key is pressed. i.e while(!kbhit) { ---------- ---------- } This code work fine in DOS but NOt in LINUX i try to use but not getting the expected result ... (0 Replies)
Discussion started by: niravuchat
0 Replies

2. Programming

equivalent function for wherey( ) ??

what is the equivalent function for wherey( ) ?? That is to return the current column position? (2 Replies)
Discussion started by: rockgal
2 Replies

3. Shell Programming and Scripting

Bash equivalent of perl's pack function ?

Is there an equivalent of perl's pack function in bash ? Or in other words, how can I achieve the same thing in bash ? Much appreciated. (1 Reply)
Discussion started by: NewDeb
1 Replies

4. Programming

Equivalent function for matlab on scilab

Hello everyone, i need help with this , i need the equivalent matlab funtion tf(x,y) in scilab and what do u recommend best from those three for a linux user (i need it for Control theory): 1-matlab 2-Scilab 3-Octave thank you for your time (0 Replies)
Discussion started by: abu_malek
0 Replies

5. Shell Programming and Scripting

SHELL SCRIPT Function Calling Another Function Please Help...

This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord but only one record is getting wrote in DB.... Please advise ASAP...:confused: function InsertFtg { FTGSTR="" echo "Saurabh is GREAT $#" let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies

6. Shell Programming and Scripting

Convert my shell script into expect/tcl

hi experts, how will i convert the first part of my script into expect or tcl since shell script cannot be embedded into expect script ? i have 100+ servers in my serverlist. how will i call or declare it in expect or tcl ? #!/usr/sbin/expect -f serverlist=`cat $1` for i in serverlist... (2 Replies)
Discussion started by: linuxgeek
2 Replies

7. UNIX for Dummies Questions & Answers

Tcl script wont run in bash shell

Hello I'm having a problem running a TCL script in my new OpenSolaris OS. When I go to the directory containing my script called 'Install' (using the gnome terminal), it doesn't seem to be able to find it even though it lists it i.e. if I type "Inst" and hit tab to complete the word, it... (11 Replies)
Discussion started by: sbsbg
11 Replies

8. Shell Programming and Scripting

Syntax error calling TCL script from shell script

hello everyone i am beginner on shell scripting .and i am working on my project work on ad hoc network i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem " syntax error near unexpected token `('... (1 Reply)
Discussion started by: marcoss90
1 Replies

9. Shell Programming and Scripting

Need to call tcl function from other file !!

Hi, Can a function written in tcl in some other file be called in unix scripts ? Like this ? This is my code now--- shell.sh: #!/bin/bash tclsh snmpv2-conf-sam.tcl $SERVER $NODESYSIP $SPASSWD but i need this in a different way like , without having a .tcl file i want the... (2 Replies)
Discussion started by: giri_luck
2 Replies

10. UNIX for Dummies Questions & Answers

Shell equivalent of matlab fwrite function

I have some matlab code that sends the serial port elements of an array using matlab's fwrite function, e.g.: fwrite(s, , 'uchar'); What would be a unix shell equivalent? E.g., after successfully accessing the port using instructions here: Simple terminal serial port program for Linux/MacOSX... (3 Replies)
Discussion started by: darwin_886
3 Replies
DateTime::Locale::ar_TN(3)				User Contributed Perl Documentation				DateTime::Locale::ar_TN(3)

NAME
DateTime::Locale::ar_TN SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'ar_TN' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Arabic Tunisia. DATA
This locale inherits from the DateTime::Locale::ar locale. It contains the following data. Days Wide (format) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Abbreviated (format) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Narrow (format) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Wide (stand-alone) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Abbreviated (stand-alone) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Narrow (stand-alone) X X X X X X X Months Wide (format) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Abbreviated (format) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Narrow (format) X X X X X X X X X X X X Wide (stand-alone) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Narrow (stand-alone) X X X X X X X X X X X X Quarters Wide (format) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Abbreviated (format) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Narrow (format) X X X X Wide (stand-alone) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Abbreviated (stand-alone) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Narrow (stand-alone) X X X X Eras Wide XXX XXXXXXX XXXXXX Abbreviated X.X X Narrow X.X X Date Formats Full 2008-02-05T18:30:30 = XXXXXXXXX 5 XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 22 XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX 15 XXXXXXX -10 Long 2008-02-05T18:30:30 = 5 XXXXXXX 2008 1995-12-22T09:05:02 = 22 XXXXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXXXX -10 Medium 2008-02-05T18:30:30 = 05X/02X/2008 1995-12-22T09:05:02 = 22X/12X/1995 -0010-09-15T04:44:23 = 15X/09X/-010 Short 2008-02-05T18:30:30 = 5X/2X/2008 1995-12-22T09:05:02 = 22X/12X/1995 -0010-09-15T04:44:23 = 15X/9X/-010 Default 2008-02-05T18:30:30 = 05X/02X/2008 1995-12-22T09:05:02 = 22X/12X/1995 -0010-09-15T04:44:23 = 15X/09X/-010 Time Formats Full 2008-02-05T18:30:30 = UTC 6:30:30 X 1995-12-22T09:05:02 = UTC 9:05:02 X -0010-09-15T04:44:23 = UTC 4:44:23 X Long 2008-02-05T18:30:30 = UTC 6:30:30 X 1995-12-22T09:05:02 = UTC 9:05:02 X -0010-09-15T04:44:23 = UTC 4:44:23 X Medium 2008-02-05T18:30:30 = 6:30:30 X 1995-12-22T09:05:02 = 9:05:02 X -0010-09-15T04:44:23 = 4:44:23 X Short 2008-02-05T18:30:30 = 6:30 X 1995-12-22T09:05:02 = 9:05 X -0010-09-15T04:44:23 = 4:44 X Default 2008-02-05T18:30:30 = 6:30:30 X 1995-12-22T09:05:02 = 9:05:02 X -0010-09-15T04:44:23 = 4:44:23 X Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXXX 5 XXXXXXX 2008 UTC 6:30:30 X 1995-12-22T09:05:02 = XXXXXXX 22 XXXXXXX 1995 UTC 9:05:02 X -0010-09-15T04:44:23 = XXXXXX 15 XXXXXXX -10 UTC 4:44:23 X Long 2008-02-05T18:30:30 = 5 XXXXXXX 2008 UTC 6:30:30 X 1995-12-22T09:05:02 = 22 XXXXXXX 1995 UTC 9:05:02 X -0010-09-15T04:44:23 = 15 XXXXXXX -10 UTC 4:44:23 X Medium 2008-02-05T18:30:30 = 05X/02X/2008 6:30:30 X 1995-12-22T09:05:02 = 22X/12X/1995 9:05:02 X -0010-09-15T04:44:23 = 15X/09X/-010 4:44:23 X Short 2008-02-05T18:30:30 = 5X/2X/2008 6:30 X 1995-12-22T09:05:02 = 22X/12X/1995 9:05 X -0010-09-15T04:44:23 = 15X/9X/-010 4:44 X Default 2008-02-05T18:30:30 = 05X/02X/2008 6:30:30 X 1995-12-22T09:05:02 = 22X/12X/1995 9:05:02 X -0010-09-15T04:44:23 = 15X/09X/-010 4:44:23 X Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XXXXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXX Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 X 1995-12-22T09:05:02 = 9:05 X -0010-09-15T04:44:23 = 4:44 X Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 X 1995-12-22T09:05:02 = 9:05:02 X -0010-09-15T04:44:23 = 4:44:23 X M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/XM) 2008-02-05T18:30:30 = 5/X2 1995-12-22T09:05:02 = 22/X12 -0010-09-15T04:44:23 = 15/X9 MEd (EX d-M) 2008-02-05T18:30:30 = XXXXXXXXX 5-2 1995-12-22T09:05:02 = XXXXXXX 22-12 -0010-09-15T04:44:23 = XXXXXX 15-9 MMdd (ddX/MM) 2008-02-05T18:30:30 = 05X/02 1995-12-22T09:05:02 = 22X/12 -0010-09-15T04:44:23 = 15X/09 MMM (LLL) 2008-02-05T18:30:30 = XXXXXX 1995-12-22T09:05:02 = XXXXXX -0010-09-15T04:44:23 = XXXXXX MMMd (d MMM) 2008-02-05T18:30:30 = 5 XXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXXX MMMEd (E d MMM) 2008-02-05T18:30:30 = XXXXXXXX 5 XXXXXX 1995-12-22T09:05:02 = XXXXXX 22 XXXXXX -0010-09-15T04:44:23 = XXXXX 15 XXXXXX MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXXX MMMMEd (E d MMMM) 2008-02-05T18:30:30 = XXXXXXXX 5 XXXXXX 1995-12-22T09:05:02 = XXXXXX 22 XXXXXX -0010-09-15T04:44:23 = XXXXX 15 XXXXXX ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (MX/yyyy) 2008-02-05T18:30:30 = 2X/2008 1995-12-22T09:05:02 = 12X/1995 -0010-09-15T04:44:23 = 9X/-010 yMEd (EEEX d/XM/Xyyyy) 2008-02-05T18:30:30 = XXXXXXXXX 5/X2/X2008 1995-12-22T09:05:02 = XXXXXXX 22/X12/X1995 -0010-09-15T04:44:23 = XXXXXX 15/X9/X-010 yMMM (MMM y) 2008-02-05T18:30:30 = XXXXXX 2008 1995-12-22T09:05:02 = XXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX -10 yMMMEd (EEEX d MMMM y) 2008-02-05T18:30:30 = XXXXXXXXX 5 XXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 22 XXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX 15 XXXXXX -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXX 2008 1995-12-22T09:05:02 = XXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX -10 yQ (yyyy Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -010 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 XXXXX XXXXX 1995-12-22T09:05:02 = 1995 XXXXX XXXXXX -0010-09-15T04:44:23 = -10 XXXXX XXXXXX yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMM (MMX/yyyy) 2008-02-05T18:30:30 = 02X/2008 1995-12-22T09:05:02 = 12X/1995 -0010-09-15T04:44:23 = 09X/-010 yyyyMMMM (MMMMX y) 2008-02-05T18:30:30 = XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::ar_TN(3)
All times are GMT -4. The time now is 03:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy