9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to search for a block with the starting pattern say
"tabId": "table_1", and ending pattern say "]"
and then add a few lines before "]"
"block1":"block_111"
"tabId": "table_1",
"title":"My title"
.....
....
}]
how do I achieve it using awk and sed.
Thanks,
Lakshmi (3 Replies)
Discussion started by: Lakshmikumari
3 Replies
2. Shell Programming and Scripting
I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ?
Thanks in Advance
<listener>
<listener-class>com.pkg1.class1</listener-class>
</listener>
.........
<listener>... (4 Replies)
Discussion started by: Lakshmikumari
4 Replies
3. Shell Programming and Scripting
I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed.
See below for the example data.
................................server 1...............................
running process 1
running... (8 Replies)
Discussion started by: Kesavan
8 Replies
4. UNIX for Advanced & Expert Users
I have a "main" file which has blocks of data for each user defined by tags BEGIN and END.
BEGIN
ID_NUM:24879
USER:abc123
HOW:47M
CMD1:xyz1
CMD2:arp2
STATE:active
PROCESS:id60
END
BEGIN
ID_NUM:24880
USER:def123
HOW:4M
CMD1:xyz1
CMD2:xyz2
STATE:running
PROCESS:id64
END (7 Replies)
Discussion started by: grep_me
7 Replies
5. Shell Programming and Scripting
Hi,
I want to remove the following code from Source files (or replace the code with empty.) from all the source files in given directory.
finally {
if (null != hibernateSession && hibernateSession.isOpen()) {
//hibernateSession.close();
}
}
It would be great if the script has... (2 Replies)
Discussion started by: hareeshram
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am new to shell script. I am trying to code on shell script but not able to find the correct syntax to write the code once it comes inside ssh.
For eg:
ssh -q HOST "
SwapInUse=\`vmstat -nm | (while read; do echo "$(date +%Y%m%d.%H%M%S) $REPLY"; done) | tail -n +3 | awk '{print... (5 Replies)
Discussion started by: Yagami
5 Replies
7. UNIX and Linux Applications
Hi,
I am not sure if this is the right forum to post an emacs question, but if you could point me to an appropriate emacs forum that would be useful too.
Anyway, here is the description of the problem:
I usually develop python code with emacs, emacs being in python code. On my desktop a... (0 Replies)
Discussion started by: alex57326
0 Replies
8. Programming
Hi, I have this block in a code and I need to know it's meaning:
bool selectEvents = config.get("selectEvents",false);
if (selectEvents) {
ifstream in("events");
while (in) {
int run, evt;
in >> run >> evt;
if (in.eof()) break;
... (5 Replies)
Discussion started by: eager2no
5 Replies
9. Shell Programming and Scripting
I need help on the code below. I am getting a compile error
syntax error at line 283 : `<<' unmatched
Looks like it doesn't like the << on the ftp line below. If I ran the code outside of this block everything work fine, but when I put in a block of code or in a function, I got syntax error. I... (1 Reply)
Discussion started by: leemjesse
1 Replies