I suspect your RAW file to have \r\n at the end of each line (typically all txt files created from MS Windows notepad). You have to remove \r from the original file. Try (not tested)
and retry the awk script with RAW1
hi ,
I have a String str="/opt/ibm/lotus/ibw/latest" or ="/opt/lotus/ibw/latest" this value is dynamic..I want to split this string into 2 strings
1. /opt/ibm/lotus(/opt/lotus) this string must ends with "lotus"
2./ibw/latest
can any body help me on this?
Regards,
sankar (2 Replies)
AWK Command parse a file based on string.
I am trying to write a shell script to parse a file based on a string and move the content of the file to another file.
Here is scenario.
File content below
Mime-Version: 1.0
Content-Type: multipart/mixed;
... (2 Replies)
Hi Friends,
Below is my requirement. I have a file with the below structure.
0001A1....
0001B1..
....
0001L1
0002A1
0002B1
......
0002L1
..
the first 4 characters are the sequence numbers for a record, A record will start with A1 and end with L1 with same sequence number. Now the... (2 Replies)
Hello Friends,
Can anyone help me for the below requirement.
I am having a file called Input.txt.
My requirement is first check the count that is wc -l input.txt
If the result of the wc -l Input.txt is less than 10 then don't split the Input.txt file. Where as if Input.txt >= 10 the split... (12 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)
KSH
HP-SOL-Lin
Cannot use xAWK
I have several strings that are quite long and i want to break them down into smaller substrings.
What I have
String = "word1 word2 word3 word4 .....wordx"
What I want
String1="word1 word2"
String2="word 3 word4"
String3="word4 word5"
Stringx="wordx... (5 Replies)
I have to split a file based on number of lines and the below command works fine:
split -l 2 Inputfile -d OutputfileMy input file contains header, detail and trailor info as below:
H
D
D
D
D
TMy split files for the above command contains:
First File:
H
DSecond File:
... (11 Replies)
hi ,
The scenario is like this,
i have a large text files (max 5MB , about 5000 file per day ),
Inside almost each line of this file there is a tag 3100.2.22.1 (represent Call_Type) , i need to generate many filess , each one with distinct (3100.2.22.1 Call_Type ) , and one more file to... (3 Replies)
I need to split the file
Conditions:
Ignore any record that either starts with 1 or 9
Split the file at position 404 , if position 404 is abc or def then write all the records in a file > File 1 , the remaining records should go in to a file > File 2
Further I want to split the... (7 Replies)
Discussion started by: protech
7 Replies
LEARN ABOUT DEBIAN
recoverdm
RECOVERDM(1) General Commands Manual RECOVERDM(1)NAME
recoverdm - recover filesdisks with damaged sectors
SYNOPSIS
recoverdm -t type -i filedevicein -o fileout [-l list] [-n retries] [-s speed]
DESCRIPTION
recoverdm This program will help you recover disks with bad sectors. You can recover files as well complete devices. In case if finds sec-
tors which simply cannot be recoverd, it writes an empty sector to the output file and continues. If you're recovering a CD or a DVD and
the program cannot read the sector in "normal mode", then the program will try to read the sector in "RAW mode" (without error-checking
etc.). This toolkit also has a utility called 'mergebad': mergebad merges multiple images into one. This can be useful when you have, for
example, multiple CD's with the same data which are all damaged. In such case, you can then first use recoverdm to retrieve the data from
the damaged CD's into image-files and then combine them into one image with mergebad.
OPTIONS -t type
is 1 for files, 10 for floppy disks and 40 for IDE disks (try -h for a complete list)
-i filedevicein
is the device or file you want to recover.
-o fileout
is the file where to write to. This file should not already exists.
-l list
This file will contain the offsets of the bad blocks as well as the size of the bad blocks. This file can be used together with the
image with the mergebad utility.
-n retries
Number of retries before going on with next sector, defaults to 6.
-r RAW read
Number of retries while reading in RAW mode before going on with next sector, default to 6.
-s rotation speed
Speed of the CD-ROMDVD, defaults to 1.
-h Gives the help message.
SEE ALSO gddrescue(1), dd_rescue(1), testdisk(1), gpart(1)AUTHOR
Folkert van Heusden <flok@xs4all.nl>,
Home page is <http://www.vanheusden.com/recoverdm/>
recoverdm Version 0.19 RECOVERDM(1)