Hi all,
I'm trying to define an alias with an embeded awk command:
alias kpipe='kill `psme| grep "ifw -r" | grep -v "grep ifw -r"| awk '{print $2}'`'
The problem is that the awk command (awk '{print $2}') contains two ' ..' quotes. So bash assumes that the first awk quote corresponds to... (5 Replies)
Good morning
I would like kindly to ask you to help me with creation of alias with awk command.
alias a="awk {print $1 "| " $2 "| " $3 "| " $4 "| " $5 "| " $6 "| " $7 "| " $8 "| " $13 "| " }"
there is some error but I don't find it please explain me what is error and how can be avoid... (1 Reply)
Good morning
I would like kindly to ask you to help me with creation of alias with awk command.
alias a="awk {print $1 "| " $2 "| " $3 "| " $4 "| " $5 "| " $6 "| " $7 "| " $8 "| " $13 "| " }"
there is some error but I don't find it please explain me what is error and how can be avoid... (5 Replies)
Hello,
How can I make an alias of an AWK one liner that prints specific lines from a file like below?
# from a command like this:
awk 'NR == 100, NR == 150' file.cfg
The alias I want to make should work like this(I guess):
<alias_command> <file.cfg><start_line><end_line>
So the... (1 Reply)
I'd like to define an alias to awk's begin statement since I use awk with different delimiters all the time and it is tiresome to type awk '{OFS="\t";FS="\t"}{BLAH BLAH}' every time. The problem is that bash won't let me make an alias with an open quote, which is necessary for the BEGIN alias to... (3 Replies)
Hi,
I am trying to write the following command as an alias in my .bashrc file.
bjobs -u all | awk '{if (NR > 1) {username++;}}END{{print"\nJOBS BY USER:\n"} for (i in username) {print username,i;}{print"\n Total Jobs=",NR-1,"\n" }}'
The command simply puts how many jobs each user is... (2 Replies)
I need to login to one server and then switch the user and set a number alias. But i cant modify the .profile file.
I have one script avi1.sh
$ more avi.sh
sudo su - bil
sh avi1.sh
and in home directory of bil i have avi1.sh that says
$ more avi1.sh
alias l='ls -ltr'
alias b='cd... (7 Replies)
Hi to all,
I'm facing some problems when adding an alias like:
#alias list="ls -al | awk '{ print $1, $2, $3, $4, (($5/1048576))"\t", $6, $7, $8, $9 }'"
and when I enter:
#list
I get:
Syntax Error The source line is 1.
The error context is
{ print >>> , <<<
awk:... (3 Replies)
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am... (3 Replies)
I am trying to turn this into an alias with no luck. I would then like to put the alias into my bashrc file. I know awk is very picky about quotes. I have tried every version of quotes, single quotes, double quotes, and backslashes that I can think of.
VAR=$(xrandr | awk '$2=="connected"{s=$1}... (3 Replies)
Discussion started by: cokedude
3 Replies
LEARN ABOUT PHP
cubrid_fetch_row
CUBRID_FETCH_ROW(3) 1 CUBRID_FETCH_ROW(3)cubrid_fetch_row - Return a numerical array with the values of the current rowSYNOPSIS
array cubrid_fetch_row (resource $result, [int $type])
DESCRIPTION
This function returns a numerical array with the values of the current row from the result set, starting from 0, and moves the internal
data pointer ahead.
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)
o $type
-Type can only be CUBRID_LOB, this parameter will be used only when you need to operate the lob object.
RETURN VALUES
A numerical array, when process is successful.
FALSE, when there are no more rows; NULL, when process is unsuccessful.
EXAMPLES
Example #1
cubrid_fetch_row(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT name,area,seats,address FROM stadium WHERE nation_code='GRE' AND seats > 10000");
printf("%-40s %-10s %-6s %-20s
", "name", "area", "seats", "address");
while ($row = cubrid_fetch_row($req)) {
printf("%-40s %-10s %-6s %-20s
", $row[0], $row[1], $row[2], $row[3]);
}
// if you want to operate LOB object, you can use cubrid_fetch_row($req, CUBRID_LOB)
cubrid_close_request($req);
cubrid_disconnect($conn);
?>
The above example will output:
name area seats address
Panathinaiko Stadium 86300.00 50000 Athens, Greece
Olympic Stadium 54700.00 13000 Athens, Greece
Olympic Indoor Hall 34100.00 18800 Athens, Greece
Olympic Hall 52400.00 21000 Athens, Greece
Olympic Aquatic Centre 42500.00 11500 Athens, Greece
Markopoulo Olympic Equestrian Centre 64000.00 15000 Markopoulo, Athens, Greece
Faliro Coastal Zone Olympic Complex 34650.00 12171 Faliro, Athens, Greece
Athens Olympic Stadium 120400.00 71030 Maroussi, Athens, Greece
Ano Liossia 34000.00 12000 Ano Liosia, Athens, Greece
SEE ALSO cubrid_execute(3), cubrid_fetch(3), cubrid_fetch_array(3), cubrid_fetch_assoc(3), cubrid_fetch_object(3).
PHP Documentation Group CUBRID_FETCH_ROW(3)