Search Results

Search: Posts Made By: selvankj
1,676
Posted By selvankj
here is the get_po_nbr function
#============================================================================
# name: get_po_nbr
# args: po number
# returns: PO number
# notes: Retrieves the PO_nbr from table for PO number...
1,676
Posted By selvankj
Perl inserting random negative integer
Hi All,

i have problem here whenever i run this perl script that is pasted here, it inserts a negative number in place of PO_nbr
.

What the script does is reads a pipe delimited file and...
933
Posted By selvankj
Issue with Perl Code in 5.10 vs 5.8
Hi All,

I am working on Perl script to insert data into a table. It is pretty straight forward. For some reason it is not working in Linux which has 5.10 version of Perl and in AIX where the Perl...
1,765
Posted By selvankj
Pattern match with awk/sed - help
I need to grep for the pattern text inside the square brackets which are in red and not in green..my current code greps patterns both of them, which i don't want

Input fileref|XP_002371341.1|...
1,542
Posted By selvankj
Of course its going to give list of all the files...
Of course its going to give list of all the files which matches the criteria in that particular directory...
2,402
Posted By selvankj
cool , both the solution works .... thanks a lot...
cool , both the solution works .... thanks a lot :)
2,402
Posted By selvankj
Append data to first column delimited file
Hi,

I have a data like

Input:
12||34|56|78
Output:
XYZ|12||34|56|78


I tried like this , but it puts it on another line


awk -F "|" ' BEGIN {"XYZ"} {print $0} 'file




Any...
3,741
Posted By selvankj
hey Jimm thanks for looking at the post and...
hey Jimm

thanks for looking at the post and repsponding

i think i confused you with cond 1 and cond2 , the thing is i have 2-3 conditions and in all instances i will have to get the count of...
3,741
Posted By selvankj
Comparison of fields then increment a counter reading line by line in a file
Hi,


i have a scenario were i should compare a few fields from each line then increment a variable based on that.

Example file
989878|8999|Y|0|Y|N|V
989878|8999|Y|0|N|N|V...
7,383
Posted By selvankj
Difference in dates in days (ksh shell)
Hi Guys,

Need a small help, how do i get the difference between two dates (in days) in KSH shell

My date is in mm/dd/YYYY format,
Is there a function to get time stamp from the respective...
4,827
Posted By selvankj
Thank you Pamu But when i use more than one...
Thank you Pamu

But when i use more than one OR , i do not get expected results


nawk -F, '$1=="3" && $4=="06" && $6=="C990" && ( $9="6H8" || $9="6H9" || $9="6R8" )
4,827
Posted By selvankj
@ Pamu can we have a 'OR' conditon in awk...
@ Pamu

can we have a 'OR' conditon in awk ?? like the below

nawk -F, '$1=="3" && $4=="06" && $6=="C990" && ($9="89" || $9="90") {OFS=FS; if($2=="111") {$2="6H8"}.....
4,827
Posted By selvankj
@ Pamu & @ all The above code works fine,...
@ Pamu & @ all

The above code works fine, but instead of hard coding can i use thea variable ?
4,827
Posted By selvankj
awk -F,...
awk -F, '$1=="3"&&$5=="229"&&$8=="990"{OFS=FS;$9="8J8"}1' file



Suppose if i have to use 4 conditions like the above, i tried doing the way below, is there any way to do it without using so...
4,827
Posted By selvankj
@gotham
Thank you :) that worked..
can you explain me the number 1 at last ?
4,827
Posted By selvankj
@ gotham
i get only error when i tried the one you gave

awk: syntax error near line 1
awk: bailing out near line 1
4,827
Posted By selvankj
@
Both the above does not work, since i need the formatting of the csv file to be intact without any change to other fileds
4,827
Posted By selvankj
@elixir_sinari
OUT should be similar to input. excpet that the values in 5th and 8th column of records starting with 3 will have to be compared to a constant then replace the 9th column with a constant

my...
4,827
Posted By selvankj
Problems with awk printf, formatted output
Hi,

i have a script, which is incomplete, am on my way developing it.

Input
1,12,2012,IF_TB001
2,12,2012,3K3
3,Z56,00000,25,229,K900,00, ,3G3, ,USD, ,0000000000,000, , , , 550000000...
2,706
Posted By selvankj
Ftp script hangs for first time,but works every second time
Hi

I have an ftp script which works fine when i execute through a test scheduler(UC4), but when i run it through the prod scheduler(UC4), it hungs indefinetely, when we cancel the job and re-run...
23,985
Posted By selvankj
wusage and wname usage
wht is wusage ?


xprtdir=`expr $$ + 10000000`
xprtdir=`echo ${xprtdir} | sed -n 's/^../\%\%/p'`
wusage set SPOOLVOL=WRKVL2
wusage set SPOOLIB="${xprtdir}"
BAT_USER_QUE=`wname WRKVL2...
9,898
Posted By selvankj
Shamrock awk '{print (NF>1?$1"3M8"$2:$0)}'...
Shamrock

awk '{print (NF>1?$1"3M8"$2:$0)}' file

can you explain me the above piece of code ..

Actually i am encountering few other hiccups when i try to update the blank records

input...
9,898
Posted By selvankj
Replace empty string on particular column
Hi
I would like to replace empty string with a particluar value, any suggessions with awk ?

my input file is not delimited with any delimiters

input

52001073M8000000004567777
5200107...
2,697
Posted By selvankj
Franklin, Thank you for the link(very much...
Franklin,

Thank you for the link(very much useful),

But still am not sure why my script behaves in such a strange fashion, i just created a file myself with 5 lines all starting with 3, but...
2,697
Posted By selvankj
I have problem here, my input file has 5...
I have problem here,

my input file has 5 lines starting with 3 but when i use the below code i get output only for 4 lines


cat $FILENAME |grep ^3 | while read line
do
nawk -v H1=$H1 -v...
Showing results 1 to 25 of 46

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