Search Results

Search: Posts Made By: nua7
1,140
Posted By nua7
Better way to do it ?
Hi All,
I have a file with 70 columns which is pipe delimited. I need to search certain values in column 13 and print the record line if it matches.

The following command works, but I think...
2,064
Posted By nua7
Use the set command to check the environment...
Use the set command to check the environment variables that are set and override the variable with the mail -x command listed before.
2,064
Posted By nua7
@arun888, you need to give all the information....
@arun888, you need to give all the information. mailx command agreed but what are the parameters passed.

This is a format of the mailx command. Check if you have "Pepsi Retail" in place of <from...
2,064
Posted By nua7
What is the command used for sending the email ?
What is the command used for sending the email ?
1
1,552
Posted By nua7
Parser
Hi All,
I am trying to create a parser to find out what cobol programs are being called by which JCL's.

I need to search recursively until the main cobol program is found being called by a JCL.
...
2,397
Posted By nua7
Syntax error
Hi,
I get the following error when I tried to use Akshay's code. Is it related to the unix flavor I use ? I am working on HP UX


syntax error The source line is 20.
The error context is
...
2,397
Posted By nua7
Hi Rudi, This does not work unless I am missing...
Hi Rudi,
This does not work unless I am missing something.

Here is the output that I see


,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
2,397
Posted By nua7
Hi, This is what I tried and works, but the...
Hi,
This is what I tried and works, but the info file can change so wanted to generalize it.



awk '{print substr($1,1,1)","substr($1,11,2)" ,"substr($1,1,13)","substr($1,11,14)" ,"$3}' test
2,397
Posted By nua7
File splitting according to the length of the fields
Hi All,
I have two files:
1> Data file
2> info file which has field lengths and start position.

Is there a way to create a comma delimited file according to the fields length and start...
2,537
Posted By nua7
This works partly
Hi Ravinder Singh,
It is deleting all the lines found before 1st EXIT statement.

Input file :

test
EXIT
Testing
EXIT
tesing123
EXIT
:JCWPROD


Output file , where first line is...
2,537
Posted By nua7
Using Shell variables in awk
Hi All,
I have a file which I am reading and looking for "EXIT" statement. I want to insert ":JCWPROD" after each EXIT statement only if ":JCWPROD" doesn't exist.

Here is the sample file :
...
2,872
Posted By nua7
Thanks Rudy. Any idea how that can be handled ?
Thanks Rudy. Any idea how that can be handled ?
2,872
Posted By nua7
Hi, [ ] did not work. @Ravi, I am working on...
Hi,
[ ] did not work.
@Ravi, I am working on HP9000 Unix servers.


(rk3388) itahpdev=> echo $SHELL
/usr/bin/sh
2,872
Posted By nua7
Yup.. Tried double quotes too. No change. ...
Yup.. Tried double quotes too. No change.

Here's the output



(rk3388) itahpdev=> title=`cat $filename | grep "TITLE:" | cut -d ":" -f3`
(rk3388) itahpdev=> if [[ -z "$title" ]]
> then
>...
2,872
Posted By nua7
Stupid question to check if variable is empty
Hi,
I am simply trying to check if the variable is empty in the code below but it isn;t working. Anything that I might have missed here



#Check if values in job card are not empty
title=`cat...
1,477
Posted By nua7
Compare first column of 2 files and replace
Hi All,
I have 2 files in the following format :

File 1

S00999999|BHANU|TEST|007 JOHN DOE APT 999||VENGA HIGHWAY|MA|09566|SCO DUAL|20140201|20140331|20140401|20140630|20140327|...
1,064
Posted By nua7
awk query
Hi,
I have a sample file in the following format.


000013560240|000013560240|001|P|155|99396|0||SS00325665|
000013560240|000013560240|002|P|17|99000|0||SS00325665|...
871
Posted By nua7
awk question
Hi All,
I have the file in following format which is sorted on column1 and column 26.I need to pick up the first two rows for every subscriber number which is column 1.



S00001002|Rohit|||130...
2,295
Posted By nua7
awk command to replace columns in 2 files
Hi All,
I already have a code which replaces column 14 of NPBR.XTR.tmp with column 8 of NPBR3G.XTR.final


awk -F'\|' 'FNR==NR{a[$1]= $2"^"$8;next;}a[$2]{split(a[$2],b,"^");$8=b[1];$14=b[2];}1'...
1,398
Posted By nua7
Filtering data based on range in column
Hi All,
I have the file in following format. I need to change column 16 and column 17 for those lines which has atleast one numerical digit in column 2 , with the exception on SUPP1

Input file :...
1,684
Posted By nua7
Thanks! Is there a way to include field 3 from...
Thanks! Is there a way to include field 3 from file 2 in the output file.

Existing code :


join -t"|" -1 1 -2 1 -o 1.1 1.2 1.3 1.4 1.5 1.6 2.3 ${SHTEMP}NPBR5.XTR.tmp ${SHTEMP}NPBR1.XTR.final >...
1,684
Posted By nua7
Join not working for comparision
Hi All,
I have 2 files where the first column of both the files have to be compared and if they match the first six columns of the first file to be extracted in the output file.

Format of files :...
1,001
Posted By nua7
Joining the files with comparing the first column
Hi,
I have two files in the following format. I am trying to compare the first column of both the files and if the values match the rows in file tst6 should be replaced in tst1.

File tst1
...
1,002
Posted By nua7
awk question.
Hi Experts,
I have the following awk program which works fine except that the total amt field is not a 10 digit field after the additions and deletions.

for example, if :
parta=00000100...
2,494
Posted By nua7
This is what I have for now. BEGIN { ...
This is what I have for now.


BEGIN {
out_filel="reports/tst3"

parta=substr($0,1,8)
partb=substr($0,9,8)
totalamt=substr($0,17,10)

totalamt=(totalamt)-(parta + partb) > out_file1

}
...
Showing results 1 to 25 of 424

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