11-26-2008
Previous code holds good only if your data file's last line is always in this format :
"Firsname Lastname:KEN:+254456789"
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
Can any one tell me, what is the maximum number of characters that can be stored in a variable?
Thanks in Advance,
Shan (9 Replies)
Discussion started by: pcshan
9 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I'm quite new to unix and hope that someone can help me on this.
I'm using csh.
Below is what i intend to do.
1. I stored some data in a file.
2. I intend to read the file line by line and store each line of data into a variable, so that i can used it later.
Anyone have any... (4 Replies)
Discussion started by: seijihiko
4 Replies
3. Solaris
Hello All,
Currently I am attempting to write a script which will capture a number at the end of a line.
The line which I am searching through ends as follows:
word word=number
for example
word word=3
OR
word word=15
I am stuck on how to capture whatever is to the right... (3 Replies)
Discussion started by: icalderus
3 Replies
4. Shell Programming and Scripting
i have to store the files in a folder and assign a variable to the the files. (0 Replies)
Discussion started by: dineshr85
0 Replies
5. Shell Programming and Scripting
Example output:
/tmp/generatelines.sh
line1
line2
line3
line4
I want each output line assigned to its own variable, ie:
"line1" --> $a
"line2" --> $b
"line3" --> $c
"line4" --> $d
Is this possible without writing to a temporary file?
Thanks (4 Replies)
Discussion started by: ksheller
4 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a question regarding the awk command. Here is the line I need to grep:
1 F= -.13250138E+03 E0= -.13249556E+03 d E =-.174650E-01 mag= 35.2157
Instead of displaying the number in red I would like to store it as a variable such as X. Is there a way to do this? Thanks for any... (3 Replies)
Discussion started by: modey3
3 Replies
7. Shell Programming and Scripting
I have a file in a windows directory the file is delivery to us like this
07210900.dat
where
07210900 is the current date.
If I want to store that file in a variable UpLoadFileName and
rename, so I can Ftp later to a UNIX directory, I am doing this, is this correct?
CDRemoteDir='cd... (0 Replies)
Discussion started by: rechever
0 Replies
8. Shell Programming and Scripting
Hi!
I need to do the following:
(1) I wan't to extract a line of a textfile (defined by a numer) and store it into a variable...
(2) ...but I want to cut out a part of the line which is between two tokens and store just this to the variable
Example:
BlaBlaBla Bla2Bla2Bla2 *pPointerOne;... (4 Replies)
Discussion started by: Michi21609
4 Replies
9. Shell Programming and Scripting
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Discussion started by: shadok
2 Replies
10. Shell Programming and Scripting
The bash below loops through a specific directory dir and finds and writes the oldest folder to a variable called $filename.
#!/bin/bash
# oldest folder stored as variable for analysis, version log created, and quality indicators matched to run
dir=/home/cmccabe/Desktop/NGS/test
find... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT LINUX
form_variables
form_variables(3FORM) form_variables(3FORM)
NAME
TYPE_ALNUM, TYPE_ALPHA, TYPE_ENUM, TYPE_INTEGER, TYPE_IPV4, TYPE_NUMERIC, TYPE_REGEXP - form system global variables
SYNOPSIS
#include <form.h>
FIELDTYPE * TYPE_ALNUM;
FIELDTYPE * TYPE_ALPHA;
FIELDTYPE * TYPE_ENUM;
FIELDTYPE * TYPE_INTEGER;
FIELDTYPE * TYPE_IPV4;
FIELDTYPE * TYPE_NUMERIC;
FIELDTYPE * TYPE_REGEXP;
DESCRIPTION
These are building blocks for the form library, defining fields that can be created using set_fieldtype(3X). Each provides functions for
field- and character-validation, according to the given datatype.
TYPE_ALNUM
This holds alphanumeric data.
TYPE_ALPHA
This holds alphabetic data.
TYPE_ENUM
This holds an enumerated type.
TYPE_INTEGER
This holds a decimal integer.
TYPE_IPV4
This holds an IPv4 internet address, e.g., "127.0.0.1".
TYPE_NUMERIC
This holds a decimal number, with optional sign and decimal point.
TYPE_REGEXP
This holds a regular expression.
PORTABILITY
The TYPE_IPV4 variable is an extension not provided by older implementations of the form library.
SEE ALSO
form(3FORM).
form_variables(3FORM)