04-30-2009
Hi Thank you so much every one.. i have got the output exactly how i wanted ... Thank you !!!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I need to insert a line into a file underneath an existing line in the file, but am unsure as to the syntax. I'm pretty sure sed can be used though, although any ideas are more than welcome. For example:
File
----
Line 1
Line 2
Line 3
Line 4
Line 6
I need to say: Insert "Line 5"... (1 Reply)
Discussion started by: danhodges99
1 Replies
2. Shell Programming and Scripting
Could someone tell me how to replace varibles using SED inside Korn Shell?
e.g. I have a ksh file program.ksh below:
------------------------------------
#!/bin/ksh
sed -n '/ABC/p' $1 > output.txt
if ]
then
status=new
elif ]
then
status=old
fi
sed -n '/$status/p' $1... (5 Replies)
Discussion started by: stevefox
5 Replies
3. Shell Programming and Scripting
Hi All,
i have one file and in that i have to read each line and do some replacement.
its is not fixed the number or column always be same it can be less also
exm
a;b;c;d;e;f (line)
i have to do something like
In the line
If c is present
then
go to end of line and append ';date'
else... (9 Replies)
Discussion started by: ravi.sadani19
9 Replies
4. Shell Programming and Scripting
Hi,
I have a file in a form of
jkkhjjk1:!:jkhdjkhjkh2:!:kljkljkljklj3:!:kljsdj4
kljlkfljf5:!:kjljljlj6:!:jhjkhjkh7
I am trying to use sed command such that everytime it find ":!:" it will removes it and print remaining of the line on the new line
Output that I need will look like following... (8 Replies)
Discussion started by: arushunter
8 Replies
5. Shell Programming and Scripting
Hi,
I have the following texts :
#1#http://www.google.com#2#Google#3#
#1#http://www.aol.com#2#AOL#3#
I need a bash script which extracts the text between the markers (marks are #1#,#2#,#3#).
I also need that text in variables ($URL and $DESCRIPT will be fine) so I can later use it to... (3 Replies)
Discussion started by: tcp27br
3 Replies
6. UNIX for Dummies Questions & Answers
I am trying to retrieve part of a line from /boot/grub/menu.lst
The line is :
gfxmenu (hd0,0)/usr/share/gfxboot/themes/pclinuxblue/boot/message
I have figured out how to get this line into a file by itself.
sed '/gfxmenu/ !d' /boot/grub/menu.lst > /tmp/menu.lst.pcl_tc
What I need to... (2 Replies)
Discussion started by: Tide
2 Replies
7. Shell Programming and Scripting
Hi All ,
I have a input file which has set of lines like this ::
cat a.txt
unix1 djkdfkjdkkdfkdjfdfkjd 09191091 unix@unix.com <2008-23-07>
unix 2 dfdfdfdfdfdfdfdfdfd
unix3 dfldfljdflkjdfldfkljdfldjfl 0565606 unix1@unix.com <2008-10-09>
unix4 dfdlfndfldflnlffddfd
for some... (4 Replies)
Discussion started by: raghav1982
4 Replies
8. Shell Programming and Scripting
Hello!
I have a "problem" with sed... In a log, I'm wondering how to have the name of the application when "INCIDENT" is in the file...
The name of the application is before "INCIDENT".
For this example, The result should be "SPVP0005"
thanks for your help! (7 Replies)
Discussion started by: Castelior
7 Replies
9. Shell Programming and Scripting
I have file with following contents;
127.0.0.1 www.google.com
127.3.3.1 www.cisco.com
127.3.5.1 www.msnbc.com
I want output as
127.0.0.1 www.google.com google.com
127.3.3.1 www.cisco.com cisco.com
127.3.5.1 www.msnbc.com msnbc.com
I tried
sed 's/www.//g'... (5 Replies)
Discussion started by: sangfroid
5 Replies
10. Shell Programming and Scripting
I want to search texts between first occurence of the matching pattern and replace it with some other text.pls advice what can be done. I searched alot, i could not find anything relevant.
Ex my input is as follows:
red
yellow
grey
white
blue
red
pink
violet
white
I want to search... (9 Replies)
Discussion started by: sangitajc
9 Replies
LEARN ABOUT DEBIAN
crashme
CRASHME(1) General Commands Manual CRASHME(1)
NAME
crashme - test operating environment software robustness
SYNOPSIS
crashme [NBYTES] [SRAND] [NTRYS] [NSUB] [VERBOSE]
DESCRIPTION
crashme is a very simple program that tests the operating environment's robustness by invoking random data as if it were a procedure. The
standard signals are caught and handled with a setjmp back to a loop which will try again to produce a fault by executing random data. Some
people call this stress testing.
COMMAND LINE OPTIONS
[NBYTES]
The [NBYTES] should be an integer, specifying the size of the random data string in bytes. If given negative then the bytes are
printed instead of being executed. If given with an explicit plus sign then the storage for the bytes is freshly malloc'ed each
time. This can have an effect on machines with seperate I and D cache mechanisms. The argument can also have a dot in it, X.Y, in
which case Y is a increment for a pointer into the random data. The buffer is recalculated only when the pointer gets near the end
of the data.
[SRAND] The [SRAND] is an input seed to the random number generator, passed to srand.
[NTRIES]
The [NTRIES] is how many times to loop before exiting normally from the program.
[NSUB] The [NSUB] is optional, the number of vfork subprocesses running all at once. If negative run one after another. If given as a
time hrs:mns:scs (hours, minutes, seconds) then one subprocess will be run to completion, followed by another, until the time limit
has been reached. If this argument is given as the empty string or . then it is ignored.
When in sequential-subprocess mode there is a 30 second time limit on each subprocess. This is to allow the instruction-set-space
random walk to continue when a process bashes itself into an infinite loop. For example, the ntrys can be bashed to a very large
number with nbytes bashed to zero. (10 second limit on Windows NT).
The SRAND argument is incremented by one for each subprocess.
[VERBOSE]
The [VERBOSE] arg is optional. 0 is the least verbose, 5 the most.
EXAMPLE
This is a suggested test, to run it for a least an hour.
crashme +2000 666 100 1:00:00
FILES
crashme.c
DIAGNOSTICS
When a signal is caught the number and nature of the signal is indicated. Setting the environment variable CRASHLOG will cause each sub-
process to record the arguments it was given.
BUGS
Not all signals are caught, and the state of the user program/process enviroment can be sufficiently damaged such that the program termi-
nates before going through all [NTRIES] operations.
If the architecture uses some kind of procedure descriptor but no special code has been not been added to castaway() in crashme.c then the
stress test will not be as potent as it would otherwise be.
Beware: This program can crash your computer if the operating system or hardware of same is buggy. User data may be lost.
AUTHOR
George J Carrette. GJC@world.std.com
VERSION
2.4 20-MAY-1994
LOCAL CRASHME(1)