Search Results

Search: Posts Made By: yonderboy
3,014
Posted By yonderboy
Neo, Your code is fine for single digit...
Neo,

Your code is fine for single digit numbers but I've just discovered that your code will match any number with more than 1 digit, for example 10, 100, 1000 ...can you help?

Thanks
2,909
Posted By yonderboy
Sed Insert file between tags
Hi,

I have a file which has the following tags in it:


####STARTTAG######

(Then 40 lines of whitespace)



####ENDTAG########

What I would like to do (using sed) is to insert...
12,556
Posted By yonderboy
Thanks very much both! My eval code now works.......
Thanks very much both! My eval code now works....

I now see what you mean about using arrays instead of counters....I am going to do that. Very longsighted of you!
12,556
Posted By yonderboy
Thanks for your response. I think perhaps I have...
Thanks for your response. I think perhaps I have been too verbose in my explanation. What it boils down to is this.....

If I have the following variables set up for an iteration:
c=1
n=2...
12,556
Posted By yonderboy
Dynamic variables and eval
Hi,

I need some direction with the following. The below code is semi-psuedo code which will hopefully make it easier to understand what I am trying to achieve:


for i in `echo ${testarray
...
3,014
Posted By yonderboy
haha, ok, thanks Neo. I didn't test my code with...
haha, ok, thanks Neo. I didn't test my code with anything other than numbers from 0-10 so I didn't notice this. I've amended it now. Thanks.
3,014
Posted By yonderboy
Fantastic, thank you. My code is working. ...
Fantastic, thank you. My code is working.

---------- Post updated at 03:20 PM ---------- Previous update was at 03:08 PM ----------

Just out of interest, can you explain how the first solution...
3,014
Posted By yonderboy
Regex for for integer from 0-7 except 2
Hi,

I am trying to use a regular exp to match any number between 0 and 7 except 2......
I am using:

echo $myvar | egrep "{1}[0-1]{1}[3-7]"

Which isnt working....

Please can someone help?...
9,886
Posted By yonderboy
Thanks for your reply. I had an idea that eval...
Thanks for your reply. I had an idea that eval would give me what I needed but the man page wasn't much help with the syntax.

Actually FYI, I actually had to reverse your suggestion to get what I...
9,886
Posted By yonderboy
How to change variable name depending on iteration
Hi,

I would like to get a solution to this situation if possible. In a "for" loop how can I assign a value to a variable and then change the name of that variable depending on the loop iteration?...
Showing results 1 to 10 of 10

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