SantaMufasa,
Either solution would be satisfactory as long as it didn't require major application level changes to the existing SQL that could cause incompatibilities with other databases.
The app (Cerious software's ThumbsPlus) uses a SQL script to create the initial database that it connects...
I'm working (strictly as a knowledgable user) with an app vendor to extend their support to Oracle. To avoid major changes, they need a way to force a null value ('') into column since a lot of built-in SQL code uses expressions like "COLVAL = ''" rather than "COLVAL IS...
The backticks don't protect the dollar sign inside the expression. The result is that the $5 evaluates as the 5th pattern match (probably null) is passed to the shell that way.
You need to escape the dollar sign to make it work the way you expect.
$size = `ls -l filename | awk '{print \$5}'`;
Even though batch language has no explicit test for whether a directory exists, you can take advantage of the fact that every directory always contains at least directory entries (. and ..)
Try this comamnd before line 11:
IF NOT EXISTS %GROUP_DIR%\. THEN MKDIR %GROUP_DIR%
Dima nailed it (again). Try this to see what's happening:
SELECT
TO_CHAR(A.REG,'DD-MON-YYYY HH24:MI:SS'),
TO_CHAR(TO_DATE(A.REG,'DD-MON-YYYY HH24:MI:SS'),'DD-MON-YYYY HH24:MI:SS')
FROM PLAYERINFO_VIEW A
WHERE A.REG IS NOT NULL
I've seen this kind of behavior in cases where there's a comment that has a semi-colon in it just before the ORDER BY. SQL*Plus doesn't seem to notice that it's commented out and then it thinks the ORDER BY on the next line is a new command.
It's not very clear what you're asking here. Can you clarify? Since $a is a scalar variable, how can it have several values?
Also, since the values you cite are numbers, rather than strings, you should be using ($a == $b), not ($a eq $b).
Programmatically, this looks to be just about as tight as it can get. The only way I see to make it faster might be to rewrite it in C, and even that doesn't guarantee improvement since I/O is likely the cause of the slowdown.
If it's practical, I'd consider a systemic solution, ensuring that...
The question mark is a shell meta-character. It should not ordinarily be used in filenames and I suspect that's the problem here. Try using a different value in its place. If you absolutely must use "?", you'll need to quote the name in any context that uses it.
The syntax you're using is appropriate for sh, not csh. Change the first line to #!/bin/sh.
Also, the line:
if [ $var -eq <integer> ]' then
should should have a semi-colon before the "then", not a single-quote.
If the asterisk were part of the filename, the call in your job list shouldn't work, so it must be coming from somewhere else.
It sounds like ls is aliased to always use the -F option. Try using "\ls" and see if the asterisk is still there.
I don't think there's a way to get *only* the names of files that have been accessed within a time frame. You need the name in order to call stat() to find the access time, so you have to get all the names first.
$now = time();
opendir(D, dirname);
@accessedfiles = ();
foreach $f (readdir(D))...
I was able so see an arglist a little over 200 characters using it.
I did notice that /usr/ucb/ps seems to limit the string based on the size of the terminal window. Try making your terminal wider before doing the ps.
Try using /usr/ucb/ps instead. The options are somewhat different but it gives a much longer part (all?) of the process args. Start with "/usr/ucb/ps -aux" to see just about everything.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.