10 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
Hi All,
I have the file in this format
**** Results Data ****
Time or Step
1
2
20
0.000000000e+00 0s 0s 0s
1.024000000e+00 Us 0s 0s
1.100000000e+00 1s 0s 0s
1.100000001e+00 1s 0s 1s
2.024000000e+00 Us Us 1s
2.024000001e+00 ... (7 Replies)
Discussion started by: diehard
7 Replies
3. UNIX for Dummies Questions & Answers
I have a table to data which one of the columns include string of text
from within that, I am searching to include few lines but not others
for example I want to to include some combination of word address such as (address.| address? |the address | your address) but not (ip address | email... (17 Replies)
Discussion started by: A-V
17 Replies
4. Shell Programming and Scripting
Hi all.....
I have a file which contains large data...like
I want to print the rows starting from "pixel" till the file read the letter "TER" into a new output file....
can anyone plz help in doing this ?? (5 Replies)
Discussion started by: CAch
5 Replies
5. Shell Programming and Scripting
I have this input file:
and the desired output is as follows:
Desired Output
This is a sample taken from a huge file. Basically, the script should take the tag (TDK11..1>) add everything that has bukle=A until it sees the blank lines. Then takes the next tag (TDK2222>) adds everything that... (4 Replies)
Discussion started by: Ernst
4 Replies
6. Shell Programming and Scripting
Hello,
i've got this output text:
and i need it to look something like this:
which means that there won't be absolute path of each directory, just it's size and the last word after last '/' in each line, and i also don't need last line '1.7M /tmp'
Looks like there is a simple... (5 Replies)
Discussion started by: krater559
5 Replies
7. Shell Programming and Scripting
hi all,
i searched in unix.com and accquired the following commands for extracting specific lines from a file ..
sed -n '16482,16482p' in.sql > out.sql
awk 'NR>=10&&NR<=20' in.sql > out.sql....
these commands are working fine if i give the line numbers as such .. but if i pass a... (2 Replies)
Discussion started by: sais
2 Replies
8. Shell Programming and Scripting
Hi,
I have a file like
LAHORE 2009-04-16 16:04:19 THU
S5830 FAULT MESSAGE SUPPRESS STATUS
LOC : ASP00
STS : SUPPRESSING CONTINUE
INF : F6201 TRUNK. DATA FAULT REPORT
COMPLETED
LAHORE 2009-04-16 16:04:20 THU
S8400 ISUP SIGNALLING TRACE -... (3 Replies)
Discussion started by: krabu
3 Replies
9. Shell Programming and Scripting
Dear All,
I have to extract a a few lines from a log file and I know the starting String and end string(WHich is same ). Is there any simplere way using sed - awk.
e.g. from the following file
--------------------------------------
Some text
Date: 21 Oct 2008
Text to be extracted... (8 Replies)
Discussion started by: rahulkav
8 Replies
10. UNIX for Dummies Questions & Answers
Hello all,
my unix is bash based and the finger command output is:
Login Name Tty Idle LoginTime Office
amos.john Amos John pts/26 1 Dec 5 16:18 (77.100.22.07)
What am trying to achieve is extract the Login (amos.john) and Name (Amos John) from this output without using awk or sed.
... (1 Reply)
Discussion started by: franny
1 Replies
bup-damage(1) General Commands Manual bup-damage(1)
NAME
bup-damage - randomly destroy blocks of a file
SYNOPSIS
bup damage [-n count] [-s maxsize] [--percent pct] [-S seed] [--equal]
DESCRIPTION
Use bup damage to deliberately destroy blocks in a .pack or .idx file (from .bup/objects/pack) to test the recovery features of bup-fsck(1)
or other programs.
THIS PROGRAM IS EXTREMELY DANGEROUS AND WILL DESTROY YOUR DATA
bup damage is primarily useful for automated or manual tests of data recovery tools, to reassure yourself that the tools actually work.
OPTIONS
-n, --num=numblocks
the number of separate blocks to damage in each file (default 10). Note that it's possible for more than one damaged segment to
fall in the same bup-fsck(1) recovery block, so you might not damage as many recovery blocks as you expect. If this is a problem,
use --equal.
-s, --size=maxblocksize
the maximum size, in bytes, of each damaged block (default 1 unless --percent is specified). Note that because of the way bup-
fsck(1) works, a multi-byte block could fall on the boundary between two recovery blocks, and thus damaging two separate recovery
blocks. In small files, it's also possible for a damaged block to be larger than a recovery block. If these issues might be a
problem, you should use the default damage size of one byte.
--percent=maxblockpercent
the maximum size, in percent of the original file, of each damaged block. If both --size and --percent are given, the maximum block
size is the minimum of the two restrictions. You can use this to ensure that a given block will never damage more than one or two
git-fsck(1) recovery blocks.
-S, --seed=randomseed
seed the random number generator with the given value. If you use this option, your tests will be repeatable, since the damaged
block offsets, sizes, and contents will be the same every time. By default, the random numbers are different every time (so you can
run tests in a loop and repeatedly test with different damage each time).
--equal
instead of choosing random offsets for each damaged block, space the blocks equally throughout the file, starting at offset 0. If
you also choose a correct maximum block size, this can guarantee that any given damage block never damages more than one git-fsck(1)
recovery block. (This is also guaranteed if you use -s 1.)
EXAMPLE
# make a backup in case things go horribly wrong
cp -a ~/.bup/objects/pack ~/bup-packs.bak
# generate recovery blocks for all packs
bup fsck -g
# deliberately damage the packs
bup damage -n 10 -s 1 -S 0 ~/.bup/objects/pack/*.{pack,idx}
# recover from the damage
bup fsck -r
SEE ALSO
bup-fsck(1), par2(1)
BUP
Part of the bup(1) suite.
AUTHORS
Avery Pennarun <apenwarr@gmail.com>.
Bup unknown- bup-damage(1)