10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am tiring to cont numbers of line between the "!" in CISCO routers
I have no problem to extract the input and change the empty line with !
!
5 Cable5/0/1 U0 4
5 Cable5/0/1 U1 4
!
5 Cable5/0/1 U2 4 ... (4 Replies)
Discussion started by: sharong
4 Replies
2. Shell Programming and Scripting
Platform : RHEL 5.4
I have several .sql files in a directory. I want to comment lines 10 to 25 for all .sql files.
How can I do this ?
The symbol for comment in SQL is --
eg:
-- select salary from emp where empname = 'URS' ; (3 Replies)
Discussion started by: omega3
3 Replies
3. UNIX for Dummies Questions & Answers
Legends,
Can you please help me in following.
I need to comment lines from “/tmp/a.txt” from the line A to line B through the command prompt only.
Please use variables not direct values like 2 or 5
It can be done with VI editor but it's not matches with my requirement (: 2,5 s/^/#/g).
... (1 Reply)
Discussion started by: sdosanjh
1 Replies
4. Shell Programming and Scripting
Hello,
I have to a add 2 lines to /etc/sudoers file under this section below, can someone please suggest script to add these two lines when execute this remotely on to a multiple servers.
before
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
After
## Allow root... (2 Replies)
Discussion started by: bobby320
2 Replies
5. Shell Programming and Scripting
i have a log file that has the date and time that looks like this:
Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic
what we want to focus on is the first 5 columns because they contain the date and time.
the date and time can be anywhere on the line. in this... (6 Replies)
Discussion started by: SkySmart
6 Replies
6. Shell Programming and Scripting
Hi All,
I need to comment specific Two Lines in fstab & want to do using & also want to ensure that is done corretly.
I am trying the below method. But its giving Search pattern not terminated.
################
b36376 67 % cat linux-fstab_testing | perl -i -wnl -e '/^('\Q... (1 Reply)
Discussion started by: ajaincv
1 Replies
7. Shell Programming and Scripting
#!/bin/bash
repository=$1;
txn=$2;
#echo -e "\n\npre-hook Script called\n\n";
logmsg=$(svnlook log ${repository} -t ${txn});
logmsg_vals="${logmsg%%|*}|";
logmsg_char="${logmsg_vals:0:1}";
logmsg_len=$(echo ${logmsg} | cut -d' ' -f1); #
logmsg_len2=$(echo ${logmsg} | awk '{print... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies
8. Shell Programming and Scripting
Hello,
I need help in putting duplicate lines within a section into another file. Here is what I'm struggling with:
Using this file “data.txt”:
ABC1 012345 header
ABC2 7890-000
ABC3 012345 Header Table
ABC4
ABC5 593.0000 587.4800
ABC5 593.5000 587.6580 <= dup need to remove
ABC5... (4 Replies)
Discussion started by: petersf
4 Replies
9. Shell Programming and Scripting
Hello,
I am in need of removing duplicate lines from within a file per section.
File:
ABC1 012345 header
ABC2 7890-000
ABC3 012345 Header Table
ABC4
ABC5 593.0000 587.4800
ABC5 593.5000 587.6580 <= dup need to remove
ABC5 593.5000 ... (5 Replies)
Discussion started by: petersf
5 Replies
10. UNIX for Dummies Questions & Answers
Is there a command to put a comment (#) in a whole part of a shell script? (5 Replies)
Discussion started by: vero_81
5 Replies