Search Results

Search: Posts Made By: manubatham20
3,491
Posted By manubatham20
Thanks Rudic. Idea seems nice, it's working...
Thanks Rudic.

Idea seems nice, it's working fine for the given test case.

echo 'abc,0.0100' | awk -F, '{for (i=1;i<=NF;i++) {$i = ($i == $i+0)?$i+0:$i}}1' OFS=,
but when I am trying it with...
3,491
Posted By manubatham20
Hi Ravinder, Thats great help. Thanks. ...
Hi Ravinder,

Thats great help. Thanks.

Corona688,

If you have given a few more seconds, and tried the solution given, you may have realized.
I always appreciate promptly help I get from...
3,491
Posted By manubatham20
Hi Corona688, Posting standard comments...
Hi Corona688,

Posting standard comments without knowledge of the context, and without looking in the problem may be your job. When I said, "not desired output" I specified the desired output in my...
3,491
Posted By manubatham20
Thanks Yoda. But it's not giving desired...
Thanks Yoda.

But it's not giving desired output.

I started trying something with sed like below:

| rev | sed -r 's/(^|,)0+([1-9])([0-9]*)(.)([0-9]*)(,|$)/\1\2\3\4\5\6/' | rev

But it...
3,491
Posted By manubatham20
Remove trailing zeros from numbers
Hi,

I am trying to remove trailing zeros from numbers in a csv file.

CSV Input : 0.5000,abc,2.00,2.400,285.850,285a.850,205.180800,mno000,a0b0,2.860

Expected Output :...
4,922
Posted By manubatham20
It depends on data, and we can't determine that.
It depends on data, and we can't determine that.
4,922
Posted By manubatham20
Yes, you got the requirements right. I was...
Yes, you got the requirements right.

I was uniquly sorting on basis of key columns, like if we have 3rd and 5th as key column, I will use sort command like sort -k3,3 -k5,5 | uniq

What will...
4,922
Posted By manubatham20
Hi, Please see the example below: ...
Hi,

Please see the example below:

Column 3 and Column 5 represents the key set.

OLD

a|ae|1|ecg|10|@jks*|xyz
b|dm|2|bp|20|$5lw!|qwe
c|co|3|mb|30|&dhf!|gfh
d|te|4|value|40|@kdk+|kdd

...
4,922
Posted By manubatham20
File delta detection
Hello,

I need to compare two flat files (ASCII format), say file OLD and file NEW. Both have similar structure. These files are | delimitted files and have around few million of records (lines)...
2,730
Posted By manubatham20
Hi Ygemici, When I passed my actual...
Hi Ygemici,

When I passed my actual directory/file names, its giving following error:

sed: The label :a;N;s/\(.*\)\n\(.*\)/\1\\n\2/;ta is greater than eight characters

I actually passed
...
2,730
Posted By manubatham20
Hmmm, ok. I have a directory structure like...
Hmmm, ok.

I have a directory structure like below:

a/b/c

mkdir -p /a/b/c

inside that there are many files like:

d1
d2
d3
d4

touch d1 d2 d3 d4

Create a file unix_test, give...
2,730
Posted By manubatham20
:( True. But I need to print in seprate...
:(

True. But I need to print in seprate lines, not space seprated (as it will disorder formatting)

Any other idea???

Thanks.
2,730
Posted By manubatham20
@Shailesh, All the rows. @Corona, ...
@Shailesh,

All the rows.

@Corona,

I have already given a code snippet above. You can use that to test.

Regards,
Manu
2,730
Posted By manubatham20
I am mainly concernd with output of ls command,...
I am mainly concernd with output of ls command, its fetching multiple rows, thats causing problem while parsing.
2,730
Posted By manubatham20
Hi, I am facing some new issue with the use...
Hi,

I am facing some new issue with the use of sed. What if above ls command returns more than one line as result. Its again failing to parse.

Please help.

Regards,
Manu
2,730
Posted By manubatham20
Stucked with sed, how to replace /
Hi,

I am using sed in way desribed below:

sed "
s/study_seq_no/$STUDY_SEQ_NO/g
s/table_nm/$TBL_NM/g
s/dmp_file_nm/$DMP_FILE_NM/g
s/dmp_file_lst/'`ls...
Forum: HP-UX 03-08-2012
6,232
Posted By manubatham20
Putting export in script solved my problem. ...
Putting export in script solved my problem.

Many thanks to all for your valuable suggestions.
Forum: HP-UX 03-04-2012
6,232
Posted By manubatham20
I didn't get that. Which commands you want...
I didn't get that.

Which commands you want me to execute?
Forum: HP-UX 03-04-2012
6,232
Posted By manubatham20
Hi, I am still not able to find, why sort...
Hi,

I am still not able to find, why sort command is failing. I have set TMPDIR to /tmpdump (as shown above) which is of 8GB and same error. While sort command was running, I have executed df -k...
Forum: HP-UX 03-02-2012
6,232
Posted By manubatham20
I executed echo $TMPDIR I didn't see any...
I executed echo $TMPDIR

I didn't see any result. What it mean? that default temp directory (/var/tmp or /tmp) is being used.

Can you tell me how to set this parameter to use some other...
Forum: HP-UX 03-02-2012
6,232
Posted By manubatham20
1.25 GB of file having 13,500,000 lines. Unix...
1.25 GB of file having 13,500,000 lines.
Unix version: HP-UX B.11.23

Regards,
Manu
Forum: HP-UX 03-02-2012
6,232
Posted By manubatham20
Sort command using which directory
Hi,

One of our script is executing following "sort" command.

/bin/sort $delimiter $key $originalFile -o $newFile

and while executing this, we are getting the following error:

sort: A...
60,222
Posted By manubatham20
Yeah, I finally did it through sendmail. Well...
Yeah, I finally did it through sendmail. Well thanks for your reply.
60,222
Posted By manubatham20
Sending HTML Email through mailx
Hi,

I am trying to send html email using mailx like follow on sh shell (Bourne) on HP-UX:

mailx -s "Test HTML output in outlook
MIME-Version: 1.0
Content-Type: text/html" receiver@host.com <...
18,952
Posted By manubatham20
Hey neutronscott, Your first option worked. ...
Hey neutronscott,

Your first option worked.

awk -v "variable=${var}"

I tried that before, but that time I was not putting it inside double quotes.

Thanks.
Showing results 1 to 25 of 38

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