Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: kcpoole
1,905
Posted By kcpoole
That is excellent Don Thank you for your help ...
That is excellent Don
Thank you for your help
Much simpler than what I was envisaging.

All I have to do now is to understand it all so I can embed it in my brain for nest time

Ken
1,905
Posted By kcpoole
This is for a 2 line input file that shows the...
This is for a 2 line input file that shows the error for the first line only
I assume because there are no blanks in the line directly before the return?

...
1,905
Posted By kcpoole
Awesome thanks That fixed that particular problem...
Awesome thanks That fixed that particular problem

The only issue now is the lines that have no trailing comma. in that case the line is split after the $event code.

...
1,905
Posted By kcpoole
is that correct format? adding that gives an...
is that correct format? adding that gives an error on Line 39 @ 40 ( line 39 is the file input line)
./test: line 39: unexpected EOF while looking for matching `"'
1,905
Posted By kcpoole
[QUOTE=Don Cragun;302958814]You can't get an exit...
[QUOTE=Don Cragun;302958814]You can't get an exit code of -1 from a process run by the shell.
Ok thanks


And having two nested loops reading from the same file can't work.
Ok thanks That was...
1,905
Posted By kcpoole
Thanks Rudi I am unsure of how to make the...
Thanks Rudi
I am unsure of how to make the requirement clearer so will include the entire file, script and output format sample.

Getting to your code snippet, how does the $event get populated...
1,905
Posted By kcpoole
As mentioned in the previous reply OS = Linux, ...
As mentioned in the previous reply
OS = Linux, Bash Shell

Part of my existing code below which pulls my required variables out already


...
1,905
Posted By kcpoole
Hi Don The extra data you mention is hardcoded...
Hi Don
The extra data you mention is hardcoded in the output format, or comes from the input line which I have already, written to variables as i need.
No issue with that it is just how i get the...
1,905
Posted By kcpoole
Find Data in test file and write each out to a line
I have a .csv file that has been create from a google form and I need to extract the data from it that has been entered by users.
The CSV will have anywhere between 100 and 1000 lines which...
1,180
Posted By kcpoole
Yes that is correct. I only just realised that I...
Yes that is correct. I only just realised that I made a typo and should have written Cnum = 53

I suppose my proof reading needs to improve to avoid confusion.

Thanks again
Ken
1,180
Posted By kcpoole
Thank you Rudi, this was exactly what i need to...
Thank you Rudi,
this was exactly what i need to achieve and probably the easiest way to do it.
A Single line of code to read an external file and write the data to 2 variables.

Thanks to all...
1,180
Posted By kcpoole
Associative Array with more than one item per entry
Hi all
I have a problem where i have a large list ( up to 1000 of items) and need to have 2 items pulled from it into variables in a bash script

my list is like the following and I could have it...
5,146
Posted By kcpoole
Hi robin we do have a happy Questioner :-) Lots...
Hi robin we do have a happy Questioner :-)
Lots of great ideas and solutions in here.

the reason I did not want to run either sed or awk is that the number in question is clipped out of a much...
5,146
Posted By kcpoole
Thank you all for your solutions Looks like my...
Thank you all for your solutions
Looks like my little problem created quite an interesting discussion :b:

Ken
5,146
Posted By kcpoole
Awesome thank you very much that is exactly what...
Awesome thank you very much that is exactly what I need to achieve:b:

Thanks
Ken
5,146
Posted By kcpoole
Sorry for that and thanks Yes i would like the...
Sorry for that and thanks
Yes i would like the output without the leading zeros as per this
$ awk '{$1+=0}1' file

Is there a way to do it using string processing rather than calling awk? ...
5,146
Posted By kcpoole
Help deleting leading zeros in a file
I have a list of numbers extracted and need to delete the leading zeros from them, but when i do so, the command I am using also deletes numbers that end in Zero as well. eg 10, 20, 30, etc

this...
1,492
Posted By kcpoole
Thanks Rudi :b: I have read so much over the...
Thanks Rudi :b:
I have read so much over the last few days re this and did not even think to use the shell. Looking at awk, sed and such and probably making life hard at the same time!

when at...
1,492
Posted By kcpoole
Extract text from file then write variable
I have a text file that has many lines, and for each line I need to extract different sections of text, then write several variables from the data.
I can split out the various sections by selecting...
1,255
Posted By kcpoole
Solved
thanks I just figured it out.

My original input file had an extra blank line in it that was causing the issue

Thanks For you help

Ken
1,255
Posted By kcpoole
thank you bot and they do work, Except they run...
thank you bot and they do work, Except they run another iteration after the final line in the file.

thus they ask the user for input on a blank lime and write a Blank entry in the array

Any...
1,255
Posted By kcpoole
If then else - Retry operation
I need to read a file line by line, then depending on the contents of each line, type in a code that will get written to an array.

The problem I have is when I ask the user to confirm the input...
1,775
Posted By kcpoole
Cool Thank you all for your help.:b: I am quite...
Cool Thank you all for your help.:b:
I am quite amazed that so many replies on a sunday

Ken
1,775
Posted By kcpoole
Excellent Thanks that works.:b: Now all I...
Excellent Thanks that works.:b:

Now all I need to do is review it in detail to understand how it works and hopefully remember it, but that is a task for me.

Re reading back thru the thread I...
1,775
Posted By kcpoole
the original file had "C 56" as the line but to...
the original file had "C 56" as the line but to test I also tried the other possibilities
"C 56" , "C 6", "C156"
Each iteration gave a following space in the outputted file and I just quoted the...
Showing results 1 to 25 of 28

 

Featured Tech Videos

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