Search Results

Search: Posts Made By: Ditto
8,912
Posted By Ditto
Have you tried putting those commands into a...
Have you tried putting those commands into a script?

ie:

echo "cd <path>" >file1.ksh
echo "cat <filename>" >> file1.ksh
chmod +x file1.ksh

make sure it's owned by <username>

then try...
1,138
Posted By Ditto
Define "full path" . is it: 1) starting...
Define "full path" .
is it:

1) starting with a slash "/" ?
then just check first character for a "/"


IAMIN=`pwd`

if [[ `echo $IAMIN | cut -c1` == "/" ]]
then
echo true
else
...
Forum: Programming 01-20-2015
1,231
Posted By Ditto
Increase the size of your TEMP tablespace - it's...
Increase the size of your TEMP tablespace - it's not big enough ..
Forum: Programming 01-19-2015
1,231
Posted By Ditto
SQL> create table junk 2 (field1 number,...
SQL> create table junk
2 (field1 number,
3 field2 number,
4 field3 number )
5 /

Table created.

SQL>
SQL> insert into junk values ( 3291234567, 333991123456789,...
1,084
Posted By Ditto
Simple method might be something like: ...
Simple method might be something like:


for i in `cat $file2`
do
head -$i $file1 | tail -1
done


not sure if there's a cleaner or more efficient way, though :)
996
Posted By Ditto
Probably a rookie answer here, but if you're...
Probably a rookie answer here, but if you're talking just scanning for the first error in a given log file, I've used this logic successfully in the past:


LN=`grep -n "<error>" <log_file> |...
10,668
Posted By Ditto
Well, that's why I suggested external tables...
Well, that's why I suggested external tables first :)

But from a DB standpoint, I see the data as needed in the database, hence the load. Agreed, he didn't explicitly ask how to load it, but...
1,517
Posted By Ditto
Perhaps I'm completely missing the point,...
Perhaps I'm completely missing the point, however, why don't you just use "which"

> which grep
/usr/bin/grep

Let the system do the heavy lifting for you?
Now you have the full path to the...
39,061
Posted By Ditto
Understood, however, the only issue I was trying...
Understood, however, the only issue I was trying point out was that because of that bit-wise fun, depending on the error code sent back, it *could* come back as 0, despite throwing an error.
(ie if...
39,061
Posted By Ditto
That won't quite work as expected: > more...
That won't quite work as expected:

> more gg.sql
whenever sqlerror exit sql.sqlcode;

select 1/0 from dual;

exit

> sqlplus -s myid@mydb @gg.sql
Enter password:
select 1/0 from dual
...
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 08:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy