hello....very new user to unix...and i have a question..i am not sure if there is such a thing
For example...the user is asked if he likes Bananas....if he says yes....
echo You like Bananas $name
at the end of the script it echos all that the user has entered so they can read it....
but... (1 Reply)
I am running on HPUX using ksh.
I have a script that uses a loop within a loop, for some reason the script seems to hang on a particuliar record. The record is fine and hits the condition in Blue. If I kill the 1st loop process the script continues on with no problem.
Begin code>
<Some... (8 Replies)
I'm trying to create a loop that will prompt the user for 15 values, not forcing them to enter all 15. If the user enters through one or more of the prompts the null value needs to be converted to 0, otherwise set the parameter = to the value entered:
ex.
Please enter file no #1: 17920
... (4 Replies)
Hi,
how can I use "for" to have two loops :
this is my script :
for i in (A B C)
do
for j in (a b c)
do
echo $i$j
done
done
#End
I want to print out
Aa
Ab
Ac ....
But I have error message :
syntax error at line 1 : `(' unexpected
Many thanks before.
How should I use "for" ?? (2 Replies)
I am traversing down a list, and I am not quite sure how to tell the loop to break when it's done going through the file.
#!/bin/sh
while :
do
read list <&3
echo $list
done
is the code. The file "list" is simply
5
4
3
2
1
any advice on how to break the loop after the file is... (1 Reply)
#!/bin/bash
IFS=$'\n'
A= a c b t g j i e d
B= t y u i o p
counter=0
found=""
for i in $(cat $A)
do
for j in $(cat $B)
do
if
then
found="yes"
fi
done
if
then (1 Reply)
Hello,
I'm not sure if this is more appropriate for the 'unix for dummies' or the 'unix for experts' forum because I'm new to this forum and this is the second topic I've discussed, but if you could let me know which one was more appropriate for something like this, please do!
So in tr (an... (2 Replies)
I'm trying to understand better the while and until loops, can someone help me with this example?
#!/bin/bash
# Listing the planets.
for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto
do
echo $planet # Each planet on a separate line.
done
echo; echo
for... (3 Replies)
Why wont my for statements work? Im trying to get this script to swich to a user an if you put in a start/stop/or restart paramater to do just that for each user. I commented out the actual start/stop actions to test it just by using echos and not do anything hasty in the environment but it... (0 Replies)
Discussion started by: LilyClaro
0 Replies
LEARN ABOUT DEBIAN
tangram::type
Tangram::Type(3pm) User Contributed Perl Documentation Tangram::Type(3pm)NAME
Tangram::Type - mapping individual fields
DESCRIPTION
Tangram's persistent type system is extensible, allowing you to mount your own types and make them persistent. All you have to do is to
register your type and provide mapping code. See Tangram::Type::Extending.
Tangram comes with built-in support for the following types:
Simple Scalar types
Supported are strings, integers, real numbers and dates. More types of this ilk are easily added.
"string", "int", "real": see Tangram::Type::Scalar
"date", "time", "datetime", "dmdatetime": see "Date/Type/Date/DateTime" in Tangram::Type
Compound Structure types
"perl_dump": see Tangram::Type::Dump::Perl. A "perl_dump" structure may contain any structure which Data::Dumper can dump success-
fully.
"storable": see Tangram::Type::Dump::Storable. Very much like "perl_dump", but implemented via the `Storable' serialisation engine.
"yaml": see Tangram::Type::Dump::YAML. Very much like "perl_dump", but implemented via the `YAML' serialisation engine. Doesn't cur-
rently work, due to inadequacies in the current Perl YAML implementation.
NEW in Tangram 2.08:
"idbif": see Tangram::Type::Dump::Any. Like the above, but can combine multiple object properties into a single database column.
`Flat' Array & Hash types
Note: these are only actually required if you need to be able to query on individual fields inside the array/hash - otherwise, the
"perl_dump" or "idbif" mapping is a lot faster and more flexible.
"flat_array": see "Array/Scalar" in Tangram::Type
"flat_hash": see "Hash/Scalar" in Tangram::Type
References to other objects
"ref": see Tangram::Type::Ref::FromMany (implementing an N to 1 relationship, in which any object can be the referant)
Sets of other objects
Set relationships are closest to the main type of relationship used in an RDBMS. Avid CompSci students will know that the relational
database model is based heavily on `Set Theory', which is a subset of a more general concept of `Categories' - generic couplings of a
number of classes.
In Perl space, these collections are represented via the Set::Object module. Sets may not have duplicate elements, and cannot contain
undef values.
"set": see Tangram::Type::Set::FromMany (implementing an unordered N to N relationship, with all objects sharing a common base class)
"iset": see Tangram::Type::Set::FromOne (implementing an unordered 1 to N relationship, with all objects sharing a common base class)
Arrays of other objects
The addition to Sets, you can have `Arrays' of objects, represented by a standard Perl array in memory. Arrays may contain undef val-
ues (in the middle of the list), and the "array" type may contain duplicates (ie, the same element present in seperate places in the
list).
"array" : see Tangram::Type::Array::FromMany (implementing an ordered N to N relationship, with all objects sharing a common base
class)
"iarray": see Tangram::Type::Array::FromOne (implementing an ordered 1 to N relationship, with all objects sharing a common base class)
Hashes of other objects
Much like the Array types, the Hash types are indexed via a string value, and represented as a Perl hash in memory. These hashes may
not contain undef values (those are dropped). The "hash" type may contain duplicate elements.
"hash" : see Tangram::Type::Hash::FromMany (implementing a keyed N to N relationship, with all objects sharing a common base class)
"ihash": see Tangram::Type::Hash::FromOne (implementing a keyed 1 to N relationship, with all objects sharing a common base class)
perl v5.8.8 2006-03-29 Tangram::Type(3pm)