Search Results

Search: Posts Made By: Greygor
7,521
Posted By Greygor
Hi, thanks for the help. My data has been...
Hi, thanks for the help.

My data has been consistent with each code sample it's been presented with :D

As I said before it is working now but thanks for all the great suggestions, you guys here...
7,521
Posted By Greygor
No, they were just examples, the files I were...
No, they were just examples, the files I were running against with real data were fine.
7,521
Posted By Greygor
Nope, the Read version. It doesn't make any sense...
Nope, the Read version. It doesn't make any sense to me either, but it now works with those pipes on the end.
7,521
Posted By Greygor
This worked for the first line of the file but...
This worked for the first line of the file but doesn't read the second line

EDIT: Because the grep returns both lines as one line concatenated. It only thinks there is one line


EDIT: Works...
7,521
Posted By Greygor
Hi it's pretty much as explained, but for clarity...
Hi it's pretty much as explained, but for clarity

KSH Script



Input text file - file1.txt



The expected result is to iterate over the two lines

The Actual Results are

I'm...
7,521
Posted By Greygor
I have confirmed that white space is the problem....
I have confirmed that white space is the problem. If I take the ws out the 5th fields are placed correctly into the variable.

The other values are also read correctly

so

v1=N
v2=N
v3=N...
7,521
Posted By Greygor
File Contents For the first iteration...
File Contents

For the first iteration SUBJECT should =

For the Second iteration SUBJECT should =
7,521
Posted By Greygor
yes, that works fine on mine, but the input file...
yes, that works fine on mine, but the input file has multiple lines.

I tried the second option and it gives me the same incorrect result.

when it tries to process the second line of input it...
7,521
Posted By Greygor
Cut and WhiteSpace Problem
Hi,

I have a shell script that reads a parameter file to set variables. I have an issue when the parameter I try to read contains whitespace.

e.g

File Contents

Code

The result is...
Showing results 1 to 9 of 9

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