...I'll apologize in advance for having defaced your code; My script-foo is no match for yours so I've dumbed it down a bit.
...what can I say...I've got a lot to learn.
...anyway, below is what I've got right now. This runs fairly well but stumbles at at least one point on our live routing tables.
Sometimes there are multiple equal-cost paths to a particular network so what this means in terms of processing the routing table with this script is, there may be several lines in a row which begin with a "[" and need to be joined to the line above them iteratively.
I imagine this means I need something like a WHILE loop for Step 3. to ensure I've joined all the "[" lines before moving on.
please help:
I want to add 1 space between string and numbers:
input file:
abcd12345
output file:
abcd 1234
The following sed command does not work:
sed 's/\(+\)\(+\)/\1 \2/' file
Any ideas, please
Andy (2 Replies)
Hi everybody
for file in *
#Bash performs filename expansion
#+ on expressions that globbing recognizes.
do
output="`grep -n "$1" "$file"`"
echo "$file: `expr "$output" : '\(^.*$\)'`"
done
In the above bash script segment, I try to print just the first line of string named... (3 Replies)
Hi,
I am not that good with reg exp and sed. But I was just looking at something the other day and came across a situation.
When I ran the below command:
echo "123 word" | sed 's/*/(&)/'
the op was:
(123) word
But when I ran:
echo "123 word" | sed 's/*/(&)/g'
the o/p was:
(123)... (4 Replies)
Dear all
i have the code which print 1 line of context before and after regexp, with line number
sed -n -e '/regexp/{=;x;1!p;g;$!N;p;D;}' -e h
the code work well but any one can tell me what each letter mean {=;x;1!p;g;$!N;p;D;}
also how i can print 2 line before and onle line after ... (2 Replies)
Hello all
According to the following file (orignal one contains 200x times the same structure...) I was wondering if someone could help me to print <byte>??</byte> values
example, running this script/command like
./script.sh xxapp
I would expect as output: 102 116 112
./script.sh xxapp2... (2 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hello Experts..
I have 3-4 C codes with Oracle SQL statements embedded. All the SQL statements starts with EXEC SQL keyword and ends with ;. I want to extract all the SQL statements out of these codes.
I did awk '/^EXEC SQL/,/\;/' inputFile (I use this on all of the codes individually). That... (2 Replies)
I'm probably just not thinking of the correct term to search for :-) But I want to match a pattern that might be 'ABC' or '1ABC' there might be three characters, or there might be four, but if there are four, the first has to be 1 (1 Reply)
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
Hi All,
I need to print the characters in the previous line just before the regular expression match
Please have a look at the input file as attached
I need to match the regular expression ^ with the character of the previous like and also the pin numbers
and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
LEARN ABOUT DEBIAN
rtfm
RTFM(1) General Commands Manual RTFM(1)NAME
rtfm - a response for easy questions from clueless lusers
SYNOPSIS
rtfm [ -p ] [ -h ] [ -d option ] [ -i interval ] [ -a action ] [ -q luser]
DESCRIPTION
rtfm is a command for system administrators to use in dealing with new users. rtfm is useful for dealing with users having trouble with
their pictures downloaded from alt.binaries.pictures.erotica. rtfm will continue to run until killed by hand, using `kill processid'.
rtfm can be invoked by anyone who has enough of a clue to know what a man page is.
OPTIONS -p Give the answer in a polite fashion.
-h Tell the clueless luser to go to hell. Used with the -p option, they'll look forward to the trip.
-d option
Debug mode using option where option is one of the following:
query Ask the luser what part of rtfm that he or she does not understand.
planet Ask what planet the luser is from.
literacy Ask the luser if the luser can read.
english Ask the luser if the luser understands English.
Mac Ask the luser if the luser has ever used a computer other than a Macintosh.
Nintendo Same as the Mac option, but slightly more harsh.
-i interval
Enable within interval seconds. interval is the time between a luser asking the same damn fool question. This option must be acti-
vated for the -a option. It stores the time of the question in /var/run/luser and checks that file each time that rtfm is activated.
interval is a number of minutes, of the form xxx.xx where each x is a decimal digit. The default is 5.00 minutes.
-a action
This defines some action to be taken in the event that the -i flag condition is met. action can be defined either at the flag level
or by a file. The options for flags are as follows:
scream Let out a scream of utter frustration.
hair Rip out your hair in total frustration.
rm Automatic command ran in lusers home directory. It can have an addition -rf flag added.
ignore Ignore the luser.
warn Warn the other sysadmins.
forward Forward to CNS advising. Particullary if the complaint is /dev/null is full.
kill Kill all the lusers processes.
FILE=file.name Use a file to define a course of actions. This can be any executeable file except those using ksh, which no god-fear-
ing right-thinking sysadmin would be caught using lest he be struck down by the wrath of God.
-q luser
Query file /etc/luser to see if luser is a real luser or a first time luser.
FILES
/etc/luser
SEE ALSO mr.biff(2),
BUGS
rtfm only checks /var/run/luser when the -a option is specified and after the -i option is invoked. Otherwise /tmp would fill up rapidly on
many systems. Also, core may dump if the -a FILE= option is anatomically impossible.
GNU Utilities July 27, 1997 RTFM(1)