I came up with a pure bash solution because.... I wanted to... :)
Code:
#!/bin/bash In reality I'd have used the awk suggestion, but just wanted to see if I could do it purely in bash. edit: Just noticed this is pretty similar to grail's solution (post #14) |
Quote:
This was working fine for most of the cases. But recently we got a test case like below and it did not work accurately. Sample data in file <<Application Name: abc def_ghi/def_ghi/def_ghi Service Name: abc_def_ghi.par Deployment Status: Success Service Instance Name: abc_def_ghi Machine Name: abc00a0194 Status: Running>> On running below code it is giving output as "def_ghi/def_ghi/def_ghi" rather than "abc def_ghi/def_ghi/def_ghi" Code:
thanks in advance. |
probably awk -F: '...... ' output.txt will help
|
hey friends
how to update 6.3 to 6.11 Redhat server online and offline please give me step |
please do not hide threads, open a new one if you need help (from the other side please ask Redhat)
|
Quote:
|
Quote:
Do not crosspost or hijack other threads, and keep this same question within the original thread you created on this subject. Meanwhile fix your question in that thread to be able to obtain better assistance on this matter. Persisting with this type of behavior will not be helpful to you or the LQ forum. |
All times are GMT -5. The time now is 04:20 AM. |