Search Results

Search: Posts Made By: subhrap.das
3,331
Posted By subhrap.das
My `command` doesnt always expect an input. ...
My `command` doesnt always expect an input.
Only if it fails it expects an "Enter".

Not sure how EOF helps and what does EOF contain.
tried your command and got the error, cannot find or open...
3,331
Posted By subhrap.das
Automatic Input to a command
Hi,
I have an issue where i run an command in a shell script.

command >/dev/null
ret=$?
echo ret

If the command returns an error i'm redirecting it to /dev/null.
The prob is if an error...
6,841
Posted By subhrap.das
Some addition
Hi Radoulov,
Just need to add 1 more condition in the script to check if the 2nd tab separated value = U then i ignore the complete line and move to the next line in temp.txt.
How can this be done?...
6,841
Posted By subhrap.das
My mistake radalouv. I apolgise. I had changed...
My mistake radalouv. I apolgise. I had changed the config files in IBM and HP and hence was getting diff outputs. Your code is PERFECT.
I have tested the code in both IBM and HP and it works fine....
6,841
Posted By subhrap.das
cat -vte temp.txt 1^I^I123^I12 34^I1$ ...
cat -vte temp.txt
1^I^I123^I12 34^I1$
A^IAB^IABC^IABDC^Ie$
6,841
Posted By subhrap.das
Current output HP-UX 1 123 12 34 ...
Current output

HP-UX

1 123 12 34 1
A ABABC ABDC e


Expected o/p / AIX o/p
1 123 12 34 1
A AB ABC ABDC e
6,841
Posted By subhrap.das
i'm not able to understand which separator are we...
i'm not able to understand which separator are we talking about here. How do i find that?
6,841
Posted By subhrap.das
Sir still not working :( Input 1 ...
Sir still not working :(

Input

1 123 12 34 1
A AB ABC ABDC e

Output in HP-UX
1 1212 34 1
A ABABC ABDC e

Expected o/p / AIX...
6,841
Posted By subhrap.das
This is the real input and output i'm trying rt...
This is the real input and output i'm trying rt now.

no change whatever i had pasted earlier.

Example 1:
I/p is

1 12 123 12 34 1
A AB ABC ABDC e
...
6,841
Posted By subhrap.das
Thanks Radalouv
Hi Radalouv,
Your query works in all scenarios but only in AIX.
nawk doesnt work in HP-UX as well.

Any help in this regard will be great.
Thanks for all your help.
2,545
Posted By subhrap.das
The input temp.txt 1 12 123 ...
The input temp.txt

1 12 123 1234 1
A AB ABC ABDC e

config.txt

{
'name' : 'Field1',
'type' : ...
2,545
Posted By subhrap.das
HP UX and AIX compatibility issue
Hi All,
The below code works perfectly on AIX machine but doesnt give the desired o/p on HP UX.
Can someone please generalise the code so that it becomes platform independent.



awk 'NR == FNR...
6,841
Posted By subhrap.das
You are correct. Its working on AIX Version 5...
You are correct. Its working on AIX Version 5 (IBM machine)
but not on HP-UX.
Can i please have a machine independent code?

Edited by radoulov: Sorry, I edited your code by mistake, see my...
6,841
Posted By subhrap.das
not working
Needs some small modification i guess.
The input temp.txt
1 12 123 1234 1
A AB ABC ABDC e


config.txt

{
'name' : ...
6,841
Posted By subhrap.das
more help please
Works like charm radoulov but a slight change in the requirement
The config file now looks like this:


{
'name' : 'field1',
'type' : 'input',
'spos' ...
6,841
Posted By subhrap.das
Not working
the o/p is as follows
A AB ABC ABDC

From the 1st and 2nd word are at correct position but 3rd word onwards the logic goes for a toss.
6,841
Posted By subhrap.das
How to put a word starting at particular position in a file using shell scripting
Hi all,
I'm new to shell scripting and hence this query.
I have 2 files. temp.txt and config.txt.
The values in temp.txt are tab separated.

ex: temp.txt
AB CDE GHIJ OPQRS WXY
...
45,604
Posted By subhrap.das
append a line to the last line in a file
Suppose i have a file "xyz.txt" which contains

abcdef
ghijklm
nop



Now in want to add "qrst" to the last line such that the file becomes

abcdef
ghijklm
nopqrst


P.S:The o/p i...
Showing results 1 to 18 of 18

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