01-31-2011
Are you trying to get fields 3-24 from each row and assign each field to a variable? Or put them vertically? What is the greater problem?
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I am new to shell scripting and trying to get values from a text file,
I have a text file with values seperated with "|". like
aga|120220090525|120220090525|120220090525|120220090530
bab|120220090530|120220090530|120220090535|120220090535|120220090535... (4 Replies)
Discussion started by: mannepalli
4 Replies
2. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
3. UNIX for Dummies Questions & Answers
Hi i have the below content in a file and i am trying to cut 5.4 , but when i use the below cut command nothing comes up . I am not sure what i am doing wrong. I am new to unix. Please help me, thanks for the help in advance.
$ cat pid.txt
5.4 21399 ./PreRating
$ cut -d ' ' -f1 pid.txt
... (8 Replies)
Discussion started by: nick1982
8 Replies
4. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
5. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
6. Shell Programming and Scripting
I am using : << cut / cut to comment out block of code.
Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines.
The "warning " is at last line of script.
done < results
169 echo "END read all positioning parameters"
170... (8 Replies)
Discussion started by: annacreek
8 Replies
7. Programming
Having trouble with the logic when looping over this switch case again:
for (j = 0; data != 0; j++){
switch(data){
case 'c':
output = ranit(r_brace_array);
break;
case 'h':
output = ranit(pipe_array);
break;
... (6 Replies)
Discussion started by: Azrael
6 Replies
LEARN ABOUT PHP
cubrid_result
CUBRID_RESULT(3) 1 CUBRID_RESULT(3)
cubrid_result - Return the value of a specific field in a specific row
SYNOPSIS
string cubrid_result (resource $result, int $row, [mixed $field])
DESCRIPTION
This function returns the value of a specific field in a specific row from a result set.
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)
o $row
-The row number from the result that is being retrieved. Row numbers start at 0.
o $field
- The name or offset of the $field being retrieved. It can be the field's offset, the field's name, or the field's table dot field
name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column
name. If undefined, the first field is retrieved.
RETURN VALUES
Value of a specific field, on success (NULL if value if null).
FALSE on failure.
EXAMPLES
Example #1
cubrid_result(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT * FROM code");
$result = cubrid_result($req, 0);
var_dump($result);
$result = cubrid_result($req, 0, 1);
var_dump($result);
$result = cubrid_result($req, 5, "f_name");
var_dump($result);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>
The above example will output:
string(1) "X"
string(5) "Mixed"
string(4) "Gold"
PHP Documentation Group CUBRID_RESULT(3)