02-05-2013
Thanks a lot Scrutinizer.. the command works good :-)
@pamu.. thanks but that code is reversing the whole string and not higher value to lower value. but thanks anyway :-)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
typeset -i A=16#0
typeset -u A=$a
y=${A#16#}
This converted $a to hex and stored it in y.
Can someone walk me through how this was done?
thanks (2 Replies)
Discussion started by: JamesByars
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
If i have an input as
c1:41 c2:0x0000.00046b3e
I want to make output display as
c1:41 c2:224062
.
Basically convert first part 0x0000 (as hex) to decimal which is 0 and
convert second part 0x00046b3e (as hex) to decimal which is 289598
and as such add both parts namely... (3 Replies)
Discussion started by: hare
3 Replies
3. Shell Programming and Scripting
Hi,
please tell me how to convert hex number to decimal
000000E7
000000000002640D
0000000000025B16
and seconds to minutes, hours, days, months, years
bytes to kbytes, mbytes , gbytes
read the following examples
while read a b
do
printf "%5d %5d\n" "0x$a" "0x$b"
done < "$FILE"... (15 Replies)
Discussion started by: jack2
15 Replies
4. Shell Programming and Scripting
Hi,
I am a bit stuck with displaying characters. I am having values like below in the proper displayable characters. which I would want to print the actual value on the right hand side. I dont want to create an array because I would have to create 255 different values. isnt there another way of... (17 Replies)
Discussion started by: ahmedwaseem2000
17 Replies
5. Shell Programming and Scripting
Hi
I would like to test for a max number value. It may be a decimal so I know I have to pipe into bc.
I just cannot get the syntax for this to work. I cannot get passed an error with the bracket - see below.
Any help appreciated.
Regards
Ewan
This works:
/export/home/ewan> cat... (5 Replies)
Discussion started by: emjs
5 Replies
6. Shell Programming and Scripting
Hi ,
How do i found out all the number in a range ( HEX)
for example
Input is
15CF:15D2
Output needed
15CF
15D0
15D1
15D2
Thanks (2 Replies)
Discussion started by: greycells
2 Replies
7. Shell Programming and Scripting
Hi all
we have a file ONE like this
12345 98765
67222 74252
76991 90091
and we have one more file TWO like
huiiii 67jjjj u988 99999 uj99j 98765
hujg 7yhh ij999 78688 ijo99 74252
Now i want create THREE file which
is like
huiiii 67jjjj u988 12345 uj99j 98765
hujg 7yhh ij999... (2 Replies)
Discussion started by: polineni
2 Replies
8. Shell Programming and Scripting
Hi All,
newbie here, i'm just wondering how can i swap the two values of variables without using the third variable.
Please advise,
Thanks, (5 Replies)
Discussion started by: nikki1200
5 Replies
9. Shell Programming and Scripting
Assume I have a file \usr\home\\somedir\myfile123.txt
and I want to replace all occurencies of the two (concatenated) hex values x'AD' x'A0' bytwo other (concatenated) hex values x'20' x'6E'
How can I achieve this with the gnu sed tool?
Additional question: Is there a way to let sed show... (1 Reply)
Discussion started by: pstein
1 Replies
10. Shell Programming and Scripting
This is very basic. Yet Iam struggling to get the right pattern for my check.
Apologize in advance to ask a very lame question.
I have to validate if a value of the variable starts with "efgh" and followed by 6 numbers.
Var1="efgh234567"
The condition Iam trying to achieve is similar to... (6 Replies)
Discussion started by: deepakwins
6 Replies
LEARN ABOUT DEBIAN
mojolicious::guides::codingguidelines
Mojolicious::Guides::CodingGuidelines(3pm) User Contributed Perl Documentation Mojolicious::Guides::CodingGuidelines(3pm)
NAME
Mojolicious::Guides::CodingGuidelines - Coding guidelines
OVERVIEW
This document describes the coding guidelines that are the foundations of Mojo and Mojolicious development.
Please do not send patches unless you agree with them.
MISSION STATEMENT
Mojo is a runtime environment for Perl real-time web frameworks. It provides all the basic tools and helpers needed to write simple web
applications and higher level web frameworks such as Mojolicious.
All components should be reusable in other projects and in a UNIXish way only loosely coupled.
Especially for people new to Perl it should be as easy as possible to install Mojolicious and get started. Writing web applications can be
one of the most fun ways to learn a language!
For developers of other web frameworks it should be possible to reuse all the infrastructure and just consider the higher levels of the
Mojolicious distribution an example application.
RULES
Web development should be easy and fun, this is what we optimize for.
The web is a moving target, to stay relevant we have to stay in motion too.
Keep it simple, no magic unless absolutely necessary.
The installation process should be as fast and painless as possible. (Less than a minute on most common hardware is a good rule of thumb)
The addition and modification of features is decided by majority vote or the pumpking.
Any core developer may nominate a new one, who must then be accepted by a 2/3 majority vote.
The pumpking has veto rights and may select his successor.
It's not a feature without a test and documentation.
A feature is only needed when the majority of the userbase benefits from it.
Features may only be changed in a major release or after being deprecated for at least 3 months.
Refactoring and deprecations should be avoided if no important feature depends on it.
New features can be marked as experimental to be excluded from deprecation policies.
A major release is signaled by a new major version number and a unique code name based on a unicode character.
Only add dependencies if absolutely necessary and make them optional if possible.
Domain specific languages should be avoided in favor of Perl-ish solutions.
No inline POD.
Documentation belongs to the guides, module POD is just an API reference.
The main focus of the included documentation should be on examples, no walls of text. (An example for every one or two sentences is a
good rule of thumb)
Everything should be ordered alphabetically if possible.
The master source code repository should always be kept in a stable state, use feature branches for actual development.
Code has to be run through Perl::Tidy with the included ".perltidyrc", and everything should look like it was written by a single person.
Code should be organized in blocks and those blocks should be commented.
No spaghetti code.
Comments should be correctly capitalized, and funny if possible, punctuation is optional if it doesn't increase readability.
Every file should contain at least one quote from "The Simpsons" or "Futurama".
No names outside of "Mojolicious.pm".
No Elitism.
Peace!
MORE
You can continue with Mojolicious::Guides now or take a look at the Mojolicious wiki <http://github.com/kraih/mojo/wiki>, which contains a
lot more documentation and examples by many different authors.
perl v5.14.2 2012-09-05 Mojolicious::Guides::CodingGuidelines(3pm)