Brilliant! we're on the exact same page!
Now I implemented your suggestions in my script but I am not entirely sure of the logic and syntax of the first string extractor... Code:
${x%% *} But if I wanted to extract the 3rd string, how would you do this? Using whitespaces as delimiters would work. Lets say for Code:
StringA 123 4567 4568 RandomStringA StringB RandomStringB Thanks, I appreciate your mentoring :) |
I may have found something... Reading the tutorials on awk, I found this:
Code:
echo $string | awk '{split($position-of-the-delimiter,a,"delimiter");print a[1]}' Code:
echo $string | awk '{split($5,a," ");print a[1]}' Code:
RandomStringA |
Code:
echo $string | awk '{print $5}' I am curious ... how is any of what we are doing now related to the original question of splitting html code to be used by curl?? |
Quote:
With your help, I think I am done! I just tried with a bunch of test directories and files, works pretty well! Thanks a lot! |
Helping is not so much the problem but if someone else tries to search for your second set of solutions it may be harder to find as there is no specific topic :)
General rule of thumb here is that if you want to ask an alternate question which diverges enough from the original then it is probably best to close one question and ask another. Glad you got to where you were going though :) |
Quote:
Sorry about that! |
nah ... no biggee :)
|
All times are GMT -5. The time now is 08:50 PM. |