Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Sathy153
4,415
Posted By Sathy153
AWK help ...some additional comparison..
Hi,

If I want to add one more condition to the below while comparing.. can I modify as below =>

Old code
========
awk '
NR==FNR{a[substr($0,1,11)];next} # Create an array of the key...
4,415
Posted By Sathy153
That works gr8!
Thanks a lot!!! :b:
That works fine.... I need some tips on debugging these, plz send me :)
4,415
Posted By Sathy153
Still no output!!
Hi,

I am still not able to get any matching rows when using 'nawk'. :confused:
Please help me to solve this! Also please let me know to debug this.

>cat file1...
4,415
Posted By Sathy153
Need some help!
Hi,

Still not able to resolve ;-(

Below are the file details
==============================================
>cat file2
12345678901
98765432101

>cat file1...
4,415
Posted By Sathy153
Getting below error!
awk '
> NR=FNR{a[substr($0,1,11)];next}
> substr($0,21,31) in a{print}
> ' file2 file1
awk: syntax error near line 2
awk: bailing out near line 2


awk 'NR=FNR{a[substr($0,1,11)];next}...
4,415
Posted By Sathy153
Doesnt work ;-(
Getting below error =>

>cut -c21-31 file1 | sed -e 's/[][\\.*^$]/\\&/g' -e 's/^/^/' | grep -f - file2
grep: illegal option -- f
Usage: grep -hblcnsviw pattern file . .


Also I need entire...
4,415
Posted By Sathy153
Doesnt work ;-(
Getting below error =>

>cut -c21-31 file1 | sed -e 's/[][\\.*^$]/\\&/g' -e 's/^/^/' | grep -f - file2
grep: illegal option -- f
Usage: grep -hblcnsviw pattern file . .


Also I need entire...
4,415
Posted By Sathy153
AWK help reqd
Hi,

I have below requirement that I need to do it using AWK.

Files
====
File1: data file that has thousands of recs
File2: Lookup file

I need to compare the position 21-31 of File1 with...
1,645
Posted By Sathy153
Debugging...
You can remove 'v' option (Verbose) and try the below -

bash -x <scriptname>

If you are not clear of any specific command...then you can check using
man <command>


Hope this helps. :)
9,317
Posted By Sathy153
Try this ..
## HEAD command works with files....so try the below script..

#! /bin/ksh
# Give the file path below ..
INFILE=/home/infil1.dat
ct=1
cnt=`cat $INFILE | wc -l`

while [ $cnt -ge $ct ]
do...
2,645
Posted By Sathy153
Info...as requested
Here are the steps...

(1) creating temp table:
create table temp ( ID int)

(2) BCP data:

bcp DB-name..temp in text.dat -U<userid> -P<password> -c -eERR.dat

;DB-name: Database name...
2,645
Posted By Sathy153
Try this..
May be you can try this..

Solution(1)
=========
(1) Create a temp table with coln : ID
(2) Copy 100 Ids.
If you are using isql, then BCP 100 ids to temp table
(3) Modify the query

select *...
9,410
Posted By Sathy153
Need some more info..
(1) Check the value of "Acct_id" in procedure: dtstg.lkp_trd_acct_prc.
This is stored in your log $PathOfTempLstFile/TrdAcctSqlLog

exec...
9,410
Posted By Sathy153
Plz give more info on script...
Would like to see the script & place where error is coming...


Thanks
9,410
Posted By Sathy153
Not sure why compare null values!
Hi,

Not sure why you are trying to compare null values. :confused:

I would suggest, you create a function & make it return "0" if success.
Then you can check for "ZERO" instead of any other...
3,696
Posted By Sathy153
Try this shell script..
Try below shell script..

#! /bin/ksh
#set -vx
INFILE1=$1
INFILE2=$2
OUTFILE=/tmp/outfil.dat
cat $INFILE1 | while read line
do
cat $INFILE2 | while read line1
do
echo $line
wrd=`echo...
13,125
Posted By Sathy153
Try this..
Ok.. Now I got your requirement.

Try below shell script..

#! /bin/ksh
#set -vx
INFILE1=$1
INFILE2=$2
OUTFILE=/tmp/outfil.dat
cat $INFILE1 | while read line
do
cat $INFILE2 | while...
3,900
Posted By Sathy153
Try modifying code..
#!/bin/bash

echo "Input numbers"
read input1
echo "Input numbers"
read input2

if [ "$input1" == "$input2" ]
then
echo "Match"
else
echo " The numbers that don't match are: "

awk...
13,125
Posted By Sathy153
Try this...
I think below steps should help you to get resolution -

$cat f1.dat
QWERTYUI098765432112345
QWIUYTUI098765432112345
CDXRTYUI098765432112345

$cat f2.dat
QWERTYUI098765432112345 abc@soft.com...
259,430
Posted By Sathy153
Autosys - Need help!!
Hi,

I have the requirement to transfer jobs from cron to Autosys.

(1) Would like to know the steps to move one cron job to Autosys.
(2) Using Autosys, can I execute unix jobs of different...
2,352
Posted By Sathy153
SSH not able to connect - Need help
Hi,

I am trying to connect to server using SSH command -

ssh -l <username>@<server> 22

But it just hangs there.. Any suggestions to connect via SSH will be of great help!
1,228
Posted By Sathy153
Use of { } in scripting - Need help
Would like to know how the below command works..in scripting

t1=${1:?"$str"}

If I pass one argument with script, t1 will be assigned with that argument irrespective of $str. I am not sure of...
27,651
Posted By Sathy153
Why not nohup
To make it run for different regions, I am planning to run as below instead of cron scheduling
(Wrapper script)-

nohup <xyz.ksh> ASIA 1>/dev/null &
nohup <xyz.ksh> EU 1>/dev/null &
...
27,651
Posted By Sathy153
Calling stored proc to run at different regions
Thanks for the quick reply.

Yes. I am using SQLPLUS.

Could you please elaborate on cron scheduling..

Many thanks in advance.
27,651
Posted By Sathy153
Calling stored proc to run at different regions
I have a requirement to write a shell script that calls stored proc.
The stored proc should run for different regions(Asia, Europe) at the same time.

Please suggest best ways to achieve this.
...
Showing results 1 to 25 of 25

 

Featured Tech Videos

All times are GMT -4. The time now is 05:18 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy