Search Results

Search: Posts Made By: Cailet
1,913
Posted By Cailet
Search and Replace between two files
Hi all-
I've got 2 files: One is the final results and one is a result set from a query.

In the final results files I have placeholder strings in there that need to be replaced by the...
3,285
Posted By Cailet
I actually figured it out on my own --- In...
I actually figured it out on my own ---

In case anyone has questions:

using korn shell

i just looped through with this: (the column is the third in the file)

while [ $i -le $recordcount...
3,285
Posted By Cailet
Trim leading zeros to make field 6 characters long
Hi all-

I've got a file that will have multiple columns. In one column there will be a string that is 10 digits in length, but I need to trim the first four zeros to make it 6 characters?
...
5,130
Posted By Cailet
Zgrep works at command line but not in script?
Hi all-

I'm trying to search through some .gz log files to verify certain feeds have passed through our app.

I have a small script that I wrote in hopes that I could automate the checking but...
15,410
Posted By Cailet
isql input file with multiple sql statements
I've got:
isql -U $USERID -S $SERVER -D $DATABASE -i inputfile.sql -o outputfile.txt

in inputfile I have:
go
sql#1
go
sql#2
go
sql#3
go

I also tried without "go" and with";" instead...
9,891
Posted By Cailet
Ok - so I can put multiple queries in my file as...
Ok - so I can put multiple queries in my file as long as they all have the semi colon.

since I have a file full of queries, I would want to use the "-i" option. Unless I am missing something, it...
9,891
Posted By Cailet
Setting variable for query using iSql / Korn Shell
Hi All-

First time using iSql.
I have 4 query files - some have more than 1 line of sql statements

After a bit of research it appears I can just use the -i command and specify the input file....
8,170
Posted By Cailet
Alrighty- so no matter what I tried it kept...
Alrighty-
so no matter what I tried it kept giving me the "can't have more than 199 fields" error. (Looks like the file has 202 - arg)

I think I figured out how to get rid of the extra characters...
8,170
Posted By Cailet
deleted
deleted
8,170
Posted By Cailet
Ok - tried that. Now it tells me cannot have more...
Ok - tried that. Now it tells me cannot have more than 199 fields (referencing the first line that needs correction)
8,170
Posted By Cailet
I thought it had worked, but I must have had my...
I thought it had worked, but I must have had my line numbers mixed up when I checked it.

Right now I have this:

awk '{if (length($0) <= 1280)
print
else
...
8,170
Posted By Cailet
Ok, just kidding. I don't know what happened the...
Ok, just kidding. I don't know what happened the first time, but now it is no longer working. Is this maybe a problem with trying to switch from nawk to awk?
8,170
Posted By Cailet
Thanks vgersh99! I had to change nawk to awk...
Thanks vgersh99!

I had to change nawk to awk (it was telling me nawk not found) and that seemed to do the trick
8,170
Posted By Cailet
Deleting Characters at specific position in a line if the line is certain length
I've got a file that would have lines similar to:
12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
34567812 x.00 xx.00 x.00...
4,125
Posted By Cailet
oops - my bad. i still had the "$" in from of the...
oops - my bad. i still had the "$" in from of the val part
it worked now

THANKS!!! :)
4,125
Posted By Cailet
Hmmm, I tried that and it is still giving me the...
Hmmm, I tried that and it is still giving me the :
awk: The field 25052601 must be in the range 0 to 199. (obviously I have a larger file than the example shown above so the "field" value is the...
4,125
Posted By Cailet
AWK with a variable - am I missing something??
I've got a file - for example:

A B C D E
21134570 1 21573 XXXX XXXX
21134570 1 21574 XXXX XXXX
21134570 1 21575 XXXX XXXX...
5,751
Posted By Cailet
JAVA - environment variable not passing
Here is part of my script:
export ERT
export CYE
export AYE
java -classpath ${CLASSPATH} -DCYE="${CYE}" -DAYE="${AYE}" -DERT="${ERT}" classname

I've verified in my script that all three...
2,830
Posted By Cailet
Newbie Question: passing a variable into java from script?
I'm currently working on my second ever ksh script!
So I apologize if this is a stupid question - I've searched the forum and on google and haven't seen anything :confused:

I'm running my script...
Showing results 1 to 19 of 19

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