Hi Franklin, thanks for reply, however this is not working for procedure test2. test2 is missing, the only issue because test2 available in new line. Can you pls reframe this as I am not that good in unix. Appreciate your quick response.
---------- Post updated at 12:46 PM ---------- Previous update was at 12:45 PM ----------
Quote:
Originally Posted by Franklin52
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
Thank You.
The UNIX and Linux Forums
---------- Post updated at 19:37 ---------- Previous update was at 19:28 ----------
Try something like this:
Hi Franklin, thanks for reply, however this is not working for procedure test2. test2 is missing, the only issue because test2 available in new line. Can you pls reframe this as I am not that good in unix. Appreciate your quick response.
I have a file nbu_faq.txt (Question/answer) which looks like this
What I am trying to do is write out each question in a file1.txt and than the question/answer in a file2.txt
like this
file1.txt
Q: What is nbu?
Q: What is blablabla...?
Q: Why ....?
file2.txt
Q: What is nbu?
A:... (4 Replies)
Hi,
I have a xml file
<cisco:name>
<cisco:mdNm>Cisco Device 7500 A Series</cisco:mdNm>
<cisco:meNm>10.1.100.19</cisco:meNm>
<cisco:ehNm>/shelf=1</cisco:ehNm>
<cisco:subname>
<cisco:meNm>10.1.100.19</cisco:meNm>
<cisco:sptp>Cisco PortA Series</cisco:sptp>
... (11 Replies)
Dear All,
Hv a very specific requirement.
I have a very large text file and in which I have to match a pattern and insert a line above and below.
Eg:
My file
cat test
date1
date2
date3
date4
I need to match 'date3' and insert "Reminder1" above date3 and insert 'reminder2'... (4 Replies)
i have a file like below. how can i printout the digits followed by the pattern -bwout and -bwin. say i run the script by entering line number 145 (the fourth line), then the o/p should be like
5000000 1024000
8 test1 -ipprot erp -ppsout 500 -ppsin 500 -bwout 300000 -bwin 300000 -statsdevice... (7 Replies)
I have
2013-06-11 23:55:14 1Umexd-0004cm-IG <= user@domain.com
I need sed/awk operation on this, so that it should print the very next pattern only after the the pattern mach <=
ie only print user@domain.com (7 Replies)
Below is the file
DISK-A 109063.2 49 31 40.79
DISK-B 110058.5 49 44 57.07
DISK-c 4402.4 2 1 2.14
from the file, i want to search for 'DISK-A' and print only that line with the first word matching to DISK-A and the output should skip DISK-A.
Desired Output: (If i'm... (2 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
I need to fetch particular string from log file based on grep condition match.
Actual requirement is need to print the next word from the same line based on grep string condtion match.
File :Java.lanag.xyz......File copied completed : abc.txt
Ouput :abc.txt
I have used below... (5 Replies)