Hello!
I would like to generate an xml file from the output of various commands generated from within a shell script (some will be in CDATA).
At the moment the only solution I have come up with is echoing xml tags around the commands eg.
echo "<bitism>" >> outputfile
/usr/sbin/prtconf... (1 Reply)
Hi All,
I have a requirement where in I have an input as follows:-
input=1-4,6,8-10,12-15
I need to explode this range into an output file as follows:-
1
2
3
4
6
8
9
10
12
13
14
15
My input may vary like 1,5-9,11-13,15-17....... (3 Replies)
hi,
I'm a beginner to UNIX and got some problem in this fibonacci.Please help me out.Here is the code:
fibo()
{
if
then
fibo=` expr {fibo ($1 - 2)} + {fibo ($1 - 1)}` | bc
echo $fibo
fi
}
echo "enter a number:"
read x
#echo "The fibonnacci series for value $x is:"
fibo $x
... (4 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Shell script to find sum of first n numbers of Fibonacci series
2. Relevant commands, code, scripts,... (0 Replies)
Unix Gurus,
I have a shell script which has few "echo" statements. I am trying to create a logfile where all the outputs of the echo statement sare stored.
I will have to add this as the final step in the existing script so that everytime the script runs, a logfile is generated with all the... (1 Reply)
Hello, I am a beginner to shell programming. Coded the following for Fibonacci series.
#!/bin/bash
fib() {
i=0
j=1
arr=0
arr=1
echo "enter the limit:"
read n
while
do
fo= expr $j - 1
f1=$j
f2= expr $j + 1
arr= expr ${arr} + ${arr}
echo ${arr} (3 Replies)
Hi,
I've written a shell script with proper intentation and commenting structure. However, I would like to generate documentation for the shell which I have written. Is there any tool as such to generate it like we have javagen/docgen ?
Please help.
Thanks,
Arjun (0 Replies)
Hi,
I am totally a newbie to any programming languages and I just started an entry level job in an IT company. One of my recent tasks is to create a script that is able to show the log file of linux service (i.e. ntpd service)
lets say, if I run my script ./test.sh, the output should be... (3 Replies)
Discussion started by: xiaogeji
3 Replies
LEARN ABOUT DEBIAN
math::fibonacci
Math::Fibonacci(3pm) User Contributed Perl Documentation Math::Fibonacci(3pm)NAME
Math::Fibonacci - Fibonacci numbers.
VERSION
$Revision: 1.5 $
SYNOPSIS
use Math::Fibonacci qw(term series decompose);
my $term = term ( 42 );
my @series = series ( 42 );
my @sum = decompose ( 65535 );
DESCRIPTION
This module provides a few functions related to Fibonacci numbers.
EXPORTS ON REQUEST
term(), series() decompose(), isfibonacci()
FUNCTIONS
term($n)
Returns the $n-th term of the Fibonacci sequence. The term is computed using the fast algorithm: "F(n) ~ g^n/sqrt(5)", where g is the
golden ratio and ~ means "take the nearest integer".
series($n)
Computes and returns the first $n Fibonacci numbers.
decompose($int)
Decomposes $int into the sum of Fibonacci numbers. Returns the list of Fibonacci numbers.
isfibonacci($int)
Returns the sequence number of $int if it is a Fibonacci number or a non-true value if it is not.
AUTHOR
Vipul Ved Prakash, <mail@vipul.net>
LICENSE
Copyright (c) 1999-2001, Vipul Ved Prakash.
This code is free software; you can redistribute it and/or modify it under the ARTISTIC license (a copy is included in the distribution) or
under the same terms as Perl itself.
perl v5.8.8 2008-03-09 Math::Fibonacci(3pm)