Search Results

Search: Posts Made By: Shanks
1,324
Posted By Shanks
Check in File
Hello,

In a main shell script, I would be getting the Table name as one of parameter, I need to check whether that table name exist in a Static List, which will have 2 column (Table Name, Column...
1,982
Posted By Shanks
Thanks everyone for your help, - S
Thanks everyone for your help,

- S
1,982
Posted By Shanks
Find and Remove rows
*******************************************
* ROW *
*******************************************
CODE:CODE1
FILE: FILE1
FIELD: FIELD1
KEY: KEY1
ORA-00001: unique constraint (ETL.KEY_PK)...
11,804
Posted By Shanks
I am not sure whether this Information would...
I am not sure whether this Information would help.
Source is a AS400 File, sample looks like this

0¿ ¿ ¿abc¿ ¿1¿123¿ ¿test¿test1¿SANDSLI¿5254¿ ¿0¿N¿ ¿0¿0¿0¿NORMAL¿ ¿ ¿000¿000¿TEST¿ ¿0¿0¿ ¿ ¿
...
11,804
Posted By Shanks
Thanks for the Tip, actually the .dat files...
Thanks for the Tip,

actually the .dat files is from a different source system, with a specific delimeter for each field ..etc
you are correct, those are not ANSI files.

could you let me...
11,804
Posted By Shanks
Convert to UTF8 File - Unix
All,

I have several *.dat files which is created in windows (ANSI Endoing) Or PC File format, once I copy those files to unix.

How can I convert those file to utf8 encoding ?
I tired iconv,...
2,693
Posted By Shanks
Thanks for the reply, and agree with the code...
Thanks for the reply, and agree with the code change.
with a minor change, it works great.
wc -l *.DAT | awk -v':' 'BEGIN{OFS=",";} {if($2 != "total") print $1,$2;}'

Thx again,
2,693
Posted By Shanks
Delimiter in output file
Hello,

I am trying to find the record count in a specific folder,
Here is the part of the code
===========================
STARTDATE=`date +"%y%m%d%H%M"`
for i in `ls *.DAT`
...
994
Posted By Shanks
IN/OR Statement
Hello,

I need to check a list of Tables using OR condition

if [ $Table -eq "UNIT.TBL" ]; then
exit 0

else
DO something

Fi

I should include more than 1 table once the...
1,284
Posted By Shanks
Thank you , this helps If I have to include...
Thank you , this helps

If I have to include an variable which is populated in the Run time
like , for e-g

CCode='Google'

awk '{ print "TEST_$CCode" $0 }' < test > test1

Please...
1,284
Posted By Shanks
Shell - Replace
Hello ,

I am trying to replace a pattern in shell script , basically there is a file with the list of tables like
A.DAT
B.DAT
C.DAT ..

I will need to replace a prefix for the list
...
1,877
Posted By Shanks
Oh ok , what I mean is Let say I have 12...
Oh ok , what I mean is

Let say I have 12 files , which I know for sure I should be getting for processing from the master list

Afile.DAT
Bfile.DAT
Cfile.DAT
….
AAfile.DAT …etc
Once I...
1,877
Posted By Shanks
Thank you very much , this works great Now...
Thank you very much , this works great

Now I will include to check the file for any empty rows , so that I can aviod to process the same , meaning even though the file exist If has 0 rows
then...
1,877
Posted By Shanks
Shell – File Compare
All,

I have a set of files in the Source , e-g
Afile.DAT
Bfile.DAT
Cfile.DAT
....
AAfile.DAT ...etc

I will know for sure the list of file name before I copy the same from the Source...
1,415
Posted By Shanks
Find Set of files
All,

I am trying to find a set of files, it could be one file OR set of file ,
all with extension .DAT
I need to do some acticity, only if the files exist in a partificular folder
like

...
1,830
Posted By Shanks
Script – Function Call
Hello,

I have Individual function in my shell script ,

Function1
{
Master activities
}

Function2
{
Sub activities 1
}

Function3
{
Sub...
1,615
Posted By Shanks
You are right , I was trying with $$ in my script...
You are right , I was trying with $$ in my script

perl -psi -e 's/\$\$$ID=<.*>/\$\$$ID=<$val>/' -- -val=33 file

to match the pattern in the file
$$ID=<0>
$$Country=<Country

once I...
1,615
Posted By Shanks
I could not see any change in the replace value ...
I could not see any change in the replace value

Thx
-
1,615
Posted By Shanks
perl - replace value
Hello,

I am trying to change a value in a param file, with the Run time variable in .sh scripts
using perl command ,

==========================================
Param file
[Global]...
1,349
Posted By Shanks
Wow , it was a simple Trim , it works fine now. ...
Wow , it was a simple Trim , it works fine now.
Thanks guys

-
1,349
Posted By Shanks
Unix Script - DB Return
Based on the earlier thread , I made the change for the oracle sequence next val from .sh script ,

X=$(sqlplus -s user/pswd << eod
set heading off
select etl.batch_sq.nextval from dual;
eod)
...
4,734
Posted By Shanks
Thanks Scott, You mean from the command...
Thanks Scott,

You mean from the command prompt , will we be able to get the results using these steps in the .sh script ?

Thx

---------- Post updated at 03:03 PM ---------- Previous update...
4,734
Posted By Shanks
Unix - Oracle DB Connect
Hello,

Returing to Unix scripts after a long while,
This might be a simple question for most of you ,
I need to connect from a .sh script to oracle, select XYZ.nextval from dual ,
, meaning...
1,659
Posted By Shanks
Sure , I agree. Let me check all the possible...
Sure , I agree. Let me check all the possible option.
Thanks for the reply.
1,659
Posted By Shanks
Thanks for the Tips, For a normal Situation...
Thanks for the Tips,

For a normal Situation , for e-g
Normal Data file
Field1<tab>Field2<tab>Field3 ,
Field1<tab>Field2<tab>Field3 ,
All the tabs will be removed and become a variable...
Showing results 1 to 25 of 27

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