Search Results

Search: Posts Made By: njny
4,404
Posted By njny
Apologies for the delayed response. Didn't...
Apologies for the delayed response. Didn't realize wisecracker responded.

Yes wisecracker, when I first posted my query, all the files were in the current directory. The 3 steps process of first...
4,404
Posted By njny
Thank you Don for explaining in so much detail....
Thank you Don for explaining in so much detail. Please see below, getting same error even after removing the spaces between "<"/">" and following command.


$ ksh --v
version sh (AT&T...
4,404
Posted By njny
It displayed syntax error if I include brackets...
It displayed syntax error if I include brackets "()".


comm -3 < (sort file1) < (sort file3) > file3
-ksh: syntax error: `(' unexpected

comm -3 < (sort file1) < (sort file3) > (file3)
-ksh:...
4,404
Posted By njny
Extract delta records using with "comm" and "sort" commands combination
Hi All,
I have 2 pipe delimited files viz., file_old and file_new. I'm trying to compare these 2 files, and extract all the different rows between them into a new_file.

comm -3 < sort file_old <...
24,500
Posted By njny
Yes it worked! In the shell script, when I...
Yes it worked!

In the shell script, when I pressed Enter key, it didn't display ">" symbol but started the next characters from new line....

$cat Test.ksh
#!/bin/ksh

sed 's/'"$(printf...
24,500
Posted By njny
Thanks to all that tried to help me. I...
Thanks to all that tried to help me.

I didn't find /usr/bin/dos2unix on our UNIX host.

xbin - the cmd didn't work.

I tried the below cmd...seems working..

$ sed 's/'"$(printf...
24,500
Posted By njny
abc.txt: ascii text
abc.txt: ascii text
24,500
Posted By njny
Sorry Makarand but I need to do this as part of...
Sorry Makarand but I need to do this as part of the shell script.

I also tried the below.

sed 's/'"$(printf '\015')"'//g' abc.txt > xyz.txt

It removed the ^M character but it is not...
24,500
Posted By njny
Makarand, we don't have this utility. Any other...
Makarand, we don't have this utility. Any other way to replace he ^M characters in shell script?
24,500
Posted By njny
Replace Control M (^M) character with new line
Hi All,
We are getting an external file in abc.csv format. When opened in excel spread sheet, it is opening alright. But when opened in notepad, I see the contents in a single line.
Ftp'd the file...
3,707
Posted By njny
As vgersh99 suggested, placing double quotes...
As vgersh99 suggested, placing double quotes around the variable in the if clause removed the errors.

Thank you all.
3,707
Posted By njny
Don - That is very valuable advise. Thanks! ...
Don - That is very valuable advise. Thanks!

Actually, when I implement the above logic in my original script (the one I gave above is sample), it is giving me the right output but also throwing...
3,707
Posted By njny
Thanks so much, it worked. I though calling...
Thanks so much, it worked.

I though calling the CmnFuncs.ksh script should do the trick, didn't know that I need to call the function seperately.

---------- Post updated at 05:17 PM ----------...
3,707
Posted By njny
Call a function in shell script from another shell script
I've 2 shell scripts viz., CmnFuncs.ksh and myScript.ksh.
1st script contains all common functions and its code is as below:

$vi CmnFuncs.ksh
#!/bin/ksh
RunDate()
{
....
....
export...
3,039
Posted By njny
Thanks Akshay, it did worked but felt it is not...
Thanks Akshay, it did worked but felt it is not optimized. It's not a problem I have at hand, but what if we have say 100+ columns in the file1 and we have 50+ numeric ones? It is not feasible to...
3,039
Posted By njny
All worked
Thanks so much, the solutions worked good.

One thing is if I want to remove the commas from 2 or more columns, how can I change the cmd? Like, here, I want to remove the commas from 2nd and 3rd...
3,039
Posted By njny
Replace a character of specified column(s) of all rows in a file
Hi - I have a file "file1" of below format. Its a comma seperated file. Note that each string is enclosed in double quotes.
"abc","-0.15","10,000.00","IJK"
"xyz","1,000.01","1,000,000.50","OPR"
...
Showing results 1 to 17 of 17

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