10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm on Linux version 2.6.32-696.3.1.el6.x86_64, using the Ksh shell.
I'm working with the input file:
John Daggett, 341 King Road, Plymouth MA
Alice Ford, 22 East Broadway, Richmond VA
Orville Thomas, 11345 Oak Bridge Road, Tulsa OK
Terry Kalkas, 402 Lans Road, Beaver Falls PA
Eric Adams,... (2 Replies)
Discussion started by: prooney
2 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I wish to know how to works the carriage return with cat.. As a picture often speaks better than words, my code below :
#te=`cat text.txt` (I tried this, but the same..)
te=$(cat text.txt)
echo $te
My file text.txt below:
BLABLABLABLABLALBLA
BLABLABLABLABLALBLA
... (9 Replies)
Discussion started by: Arnaudh78
9 Replies
3. Shell Programming and Scripting
Hi,
I try to handle very large numbers with a bash script. I run ssh command in a remote server and store the output in a local variable. But this output contains a return carriage at the end. So I try to remove it by tr But I can't figure out the right notation with printf. So my problem... (6 Replies)
Discussion started by: Meacham12
6 Replies
4. Shell Programming and Scripting
I have a CSV with carriage returns in place of newlines. I am trying to use tr to remove them, but it isn't working.
Academic year,Term,Course name,Period,Last name,Nickname
2012-2013,First Semester,English 12,4th Period,Arnold,Adam
2012-2013,First Semester,English 12,4th Period,Adams,Jim... (1 Reply)
Discussion started by: nextyoyoma
1 Replies
5. Shell Programming and Scripting
Hi all,
I'm reading a file with this layout:
First_Col Second_Col
The Second_Col has values as 1000, -1, 10, 43...
While reading the file I'm getting the second column value with awk command, but it is including the CR control char.
do
item_saved=`echo $b | awk '{print... (4 Replies)
Discussion started by: mrreds
4 Replies
6. Shell Programming and Scripting
Guys - Simple code, i am trying to get a number back from sqlplus call to a query. After that, i need to use that number in a loop.
---------------------------------
#!/bin/ksh
VALUE=`sqlplus -silent sh/password@sh <<END
set pagesize 0 feedback off verify off heading off echo off
select... (10 Replies)
Discussion started by: sunshine1974
10 Replies
7. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
8. Shell Programming and Scripting
How do we delete all carriage returns after a particular string using sed inside a K Shell?
e.g. I have a text file named file1 below:
$ more file1
Group#=1 User=A
Role=a1
Group#=2 User=B
Role=a1
Role=b1
Group#=3 User=C
Role=b1
I want the carriage returns to be delete on the... (12 Replies)
Discussion started by: stevefox
12 Replies
9. Shell Programming and Scripting
As the title suggests, i am having some trouble figuring out how to pass spaces and carriage returns to a 'here document' ie
#!/bin/bash
/usr/local/install_script.sh <<SCRIPT
yes
no
<pass carriage retun here>
yes
no
<pass a space and then a carriage return here>
exit
SCRIPT
any... (0 Replies)
Discussion started by: hcclnoodles
0 Replies
10. UNIX for Dummies Questions & Answers
Is there a command in unix to remove a carriage return character(^M) at the end of a variable value? (5 Replies)
Discussion started by: flagship99
5 Replies
DBIx::SearchBuilder::Handle::Oracle(3pm) User Contributed Perl Documentation DBIx::SearchBuilder::Handle::Oracle(3pm)
NAME
DBIx::SearchBuilder::Handle::Oracle - An oracle specific Handle object
SYNOPSIS
DESCRIPTION
This module provides a subclass of DBIx::SearchBuilder::Handle that compensates for some of the idiosyncrasies of Oracle.
METHODS
Connect PARAMHASH: Driver, Database, Host, User, Password
Takes a paramhash and connects to your DBI datasource.
BuildDSN
Customized version of "BuildDSN" in DBIx::SearchBuilder::Handle method.
Takes additional argument SID. Database argument used unless SID provided. Two forms of DSN are generated depending on whether Host
defined or not:
dbi:Oracle:sid=<SID>;host=...[;port=...]
dbi:Oracle:<SID>
Read details in documentation for DBD::Oracle module.
Insert
Takes a table name as the first argument and assumes that the rest of the arguments are an array of key-value pairs to be inserted.
InsertFromSelect
Customization of "InsertFromSelect" in DBIx::SearchBuilder::Handle.
Unlike other DBs Oracle needs:
o id generated from sequences for every new record.
o query wrapping in parens.
NOTE that on Oracle there is a limitation on the query. Every column in the result should have unique name or alias, for example the
following query would generate "ORA-00918: column ambiguously defined" error:
SELECT g.id, u.id FROM ...
Solve with aliases:
SELECT g.id AS group_id, u.id AS user_id FROM ...
KnowsBLOBs
Returns 1 if the current database supports inserts of BLOBs automatically. Returns undef if the current database must be informed of BLOBs
for inserts.
BLOBParams FIELD_NAME FIELD_TYPE
Returns a hash ref for the bind_param call to identify BLOB types used by the current database for a particular column type. The current
Oracle implementation only supports ORA_CLOB types(112).
ApplyLimits STATEMENTREF ROWS_PER_PAGE FIRST_ROW
takes an SQL SELECT statement and massages it to return ROWS_PER_PAGE starting with FIRST_ROW;
DistinctQuery STATEMENTREF
takes an incomplete SQL SELECT statement and massages it to return a DISTINCT result set.
BinarySafeBLOBs
Return undef, as Oracle doesn't support binary-safe CLOBS
DatabaseVersion
Returns value of ORA_OCI constant, see "Constants" in DBI.
SimpleDateTimeFunctions
Returns hash reference with specific date time functions of this database for "DateTimeFunction" in DBIx::SearchBuilder::Handle.
ConvertTimezoneFunction
Custom implementation of "ConvertTimezoneFunction" in DBIx::SearchBuilder::Handle.
Use the following query to get list of timezones:
SELECT tzname FROM v$timezone_names;
Read Oracle's docs about timezone files:
http://download.oracle.com/docs/cd/B14117_01/server.101/b10749/ch4datetime.htm#i1006667
AUTHOR
Jesse Vincent, jesse@fsck.com
SEE ALSO
perl(1), DBIx::SearchBuilder
perl v5.14.2 2011-09-21 DBIx::SearchBuilder::Handle::Oracle(3pm)