dear friends,
I have a large size file containg two fields data
like this
*** ****
122 222
***** *****
***** *****
232 233
i have file like this.
i want to remove blank lines from file .
i think awk is servive this problem
i wrote a awk command but the error is... (3 Replies)
Dear friends,
I am writing shell script in csh .
i want to make arthimatic operation in csh.
i wrote sysntax like this.
set val = 230
set tmp = `0.1 * $val + 300`
echo $tmp
but it is not working .
anyone please give me syntax. (3 Replies)
cat > $file <<OP1 #line 1
#some commands
OP1#last lineHi, i came across the above shell code, but i don't understand the purpose of the first line and and last line,especially the effect of putting a tag( OP1) , can anyone advise me their purpose? (2 Replies)
I am calculating a time and appending a space in front of it to get only certain records in a file because the times are represented in HH:II:SS format and I don't want to see anything other than the actual hour and minute combination (hence appending the space to the front of the time). My... (9 Replies)
I have one File named "txt_file"
# cat txt_file
<DBType>RT</DBType>
<AppType>RT</AppType>
--------------------------------------------------
I want replace "<AppType>RT</AppType>" to
<AppType>XY</AppType> in txt_file and output redirect to Newfile
... (2 Replies)
I'm calling the following if-else from nawk. But I keep getting an error at the "else". I've tried putting more brackets and ; but still I get complaints about the "else".
Any ideas ?
Thanks,
wbrunc
BEGIN { FS = "," ; OFS = "," }
{ if ( $8 ~ /A/ && $9 == B )
$1="4/29/2013" ;
$2="J.Doe"... (2 Replies)
awk -v sw="lemons|dogs" 'NR>100 && NR<200 BEGIN { c=split(sw,a,""); } { for (w in a) { if ($0 ~ a) d]++; } }
END { for (i in a) { o=o (a"="(d]?d]:0)","); }
sub(",*$","",o); print o;
}' /home/jahitt/data.txt
what am i doing wrong with the above code? im pretty sure the issue is in the... (6 Replies)
Hi All,
I have a syntax problem with a procedure in oracle. I am looking to just produce the number of rows
from each table located in the HR schema nothing complex. This procedure works great up to dbms_output.put_line(tab_var); where it lists the names of each table in the user schema.
My... (5 Replies)
Hello! i try to understand the art of bash scripting but unfortunately, more i try and less i understand it.
Can someone tell me how i can learn its logic? i will give you an example why its making me crazy. Look at this basic script:
my for loops are working like this, but it took me more than... (10 Replies)
Discussion started by: sablista
10 Replies
LEARN ABOUT DEBIAN
data::phrasebook::sql::query
Data::Phrasebook::SQL::Query(3pm) User Contributed Perl Documentation Data::Phrasebook::SQL::Query(3pm)NAME
Data::Phrasebook::SQL::Query - Query Extension to the SQL/DBI Phrasebook Model.
SYNOPSIS
my $q = $book->query( 'find_author' );
my $q = $book->query( 'find_author', 'Dictionary' );
DESCRIPTION
An extension to the SQL class to specifically handle the DBI interface for each query requested.
CONSTRUCTOR
new
Not to be accessed directly, but via the parent Data::Phrasebook, by specifying the class as SQL.
METHODS
sql
Get/set the current "sql" statement, in a form suitable for passing straight to DBI.
sth
Get/set the current statement handle.
args
Return list of arguments that will be used as bind parameters to any placeholders. Any given arguments will replace the whole list.
Returns list in list context, arrayref in scalar.
order
As for "args", but regarding the corresponding list of argument names.
The assorted "order_XXX" methods are supported as for "args_XXX".
dbh
Get/set the database handle.
PREPARATION / EXECUTING METHODS
execute
Executes the query. Returns the result of "DBI::execute".
Any arguments are given to "order_args" with the return of that method being used as arguments to "DBI::execute". If no arguments, uses
those already specified.
Calls "prepare" if necessary.
order_args
Given a hash or hashref of keyword to value mappings, organises an array of arguments suitable for use as bind parameters in the order
needed by the query itself.
prepare
Prepares the query for execution. This method is called implicitly in most cases so you generally don't need to know about it.
rebind
Rebinds any bound values. Lets one pass a scalar reference in the arguments to "order_args" and have the bound value update if the original
scalar changes.
This method is not needed externally to this class.
DELEGATED METHODS
Any method not mentioned above is given to the statement handle.
All these delegations will implicitly call "prepare".
SEE ALSO
Data::Phrasebook, Data::Phrasebook::SQL.
SUPPORT
Please see the README file.
AUTHOR
Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003)
Maintainer: Barbie <barbie@cpan.org> since January 2004.
for Miss Barbell Productions <http://www.missbarbell.co.uk>.
COPYRIGHT AND LICENSE
Copyright (C) 2003 Iain Truskett.
Copyright (C) 2004-2010 Barbie for Miss Barbell Productions.
This module is free software; you can redistribute it and/or
modify it under the Artistic Licence v2.
perl v5.10.1 2010-08-31 Data::Phrasebook::SQL::Query(3pm)