On Wed, 21 Dec 2022 at 04:18, Lee wrote:
> On 12/20/22, David wrote:
> > $ echo -e '100:CD001\nXXX\n200:CD001' | awk 'BEGIN { FS=":" ; done=0 }
> > /CD001/ && done==0 { print $1 - 50 ; done=1 }'
> > 50
>
> You can do it without flags:
>
> $ echo -e '100:CD001\nXXX\n200:CD001' | awk -F: '/CD001/
Hi,
i meanwhile had a chance to inspect the image file and found that it
shows a repeating pattern of bytes with value 255 every 2352 bytes.
This corresponds to the size of medium level CD sectors, as can be obtained
by SCSI command "READ CD" (e.g. via Linux ioctl CDROMREADRAW).
CD-DA audio secto
On 12/20/22, David wrote:
> On Tue, 20 Dec 2022 at 22:04, David wrote:
>> On Tue, 20 Dec 2022 at 22:02, David wrote:
>
>> > $ echo -e '100:CD001\n200:CD001' | awk 'BEGIN { FS=":" } /CD001/ &&
>> > NR==1 { print $1 - 50 }'
>> > 50
>>
>> Oops, my mistake, that's not the solution. Give me another m
> Not that that is always important. But I just commented today
> because so often 'awk' is ignored as if its only capability is 'print $1'
> when in fact it is actually very powerful but neglected.
FWIW, `sed` can also do that job. Tho the subtraction part would take
a lot more work (`sed` does
On Tue, 20 Dec 2022 at 22:04, David wrote:
> On Tue, 20 Dec 2022 at 22:02, David wrote:
> > $ echo -e '100:CD001\n200:CD001' | awk 'BEGIN { FS=":" } /CD001/ &&
> > NR==1 { print $1 - 50 }'
> > 50
>
> Oops, my mistake, that's not the solution. Give me another minute and I
> will post a better one
Hi,
The Wanderer wrote:
> With the '-o' option, grep prints only the parts of the line that were
> matched - but the plural here is very relevant. If that guess is
> correct, then the "line" in question has *four* occurrences, so grep
> prints them all - each on a separate line of output.
The man
Hi,
Yvan Masson wrote:
> Kernel logs say "isofs_fill_super: get root inode failed".
So there is more stuff inserted between the volume descriptor and the
root directory of the ISO.
(The descriptor contains a minimal directory record which points to
the content of the root directory. All attribut
On Tue, 20 Dec 2022 at 22:02, David wrote:
> $ echo -e '100:CD001\n200:CD001' | awk 'BEGIN { FS=":" } /CD001/ &&
> NR==1 { print $1 - 50 }'
> 50
Oops, my mistake, that's not the solution. Give me another minute and I
will post a better one one.
On Tue, 20 Dec 2022 at 21:53, The Wanderer wrote:
> On 2022-12-20 at 05:37, David wrote:
> > On Tue, 20 Dec 2022 at 21:10, The Wanderer wrote:
> >> On 2022-12-20 at 02:51, Thomas Schmitt wrote:
> >>> This contradicts the promises of man grep about option -m.
> >> It does seem to, at least at a
On 2022-12-20 at 05:37, David wrote:
> On Tue, 20 Dec 2022 at 21:10, The Wanderer
> wrote:
>
>> On 2022-12-20 at 02:51, Thomas Schmitt wrote:
>>> This contradicts the promises of man grep about option -m.
>>
>> It does seem to, at least at a glance - but I think I've figured
>> out what's going
On Tue, 20 Dec 2022 at 21:10, The Wanderer wrote:
> On 2022-12-20 at 02:51, Thomas Schmitt wrote:
> >>> offst=$( expr \
> >>> $( grep -a -o -b -m 1 CD001 cdimage.iso \
> >>> | sed -e 's/:/ /' \
> >>> | awk '{ print $1 }' ) - 32769 )
> >
> > The Wande
On 2022-12-20 at 02:51, Thomas Schmitt wrote:
> Hi,
>
> i wrote:
>>> To obtain the offset of the first occurence of "CD001", do
>>>
>>> offst=$( expr \
>>> $( grep -a -o -b -m 1 CD001 cdimage.iso \
>>> | sed -e 's/:/ /' \
>>> | awk '{ print $1 }' )
So the new safer proposal is:
offst=$( expr \
$( grep -a -o -b -m 1 CD001 cdimage.iso \
| head -1 \
| sed -e 's/:/ /' \
| awk '{ print $1 }' ) - 32769 )
Afterwards $offst should hold a number > 0, which may be used with mo
Hi,
i wrote:
> > To obtain the offset of the first occurence of "CD001", do
> >
> > offst=$( expr \
> > $( grep -a -o -b -m 1 CD001 cdimage.iso \
> > | sed -e 's/:/ /' \
> > | awk '{ print $1 }' ) - 32769 )
The Wanderer wrote:
> Cutting down the comm
On 2022-12-19 at 16:07, Thomas Schmitt wrote:
> Hi,
>
> Yvan Masson wrote:
>> I am really not at ease using tools like hexdump,
>
> I pondered a bit more. If it's an ISO filesystem wrapped into some header
> and maybe a footer, then mount option -o offset= could help.
>
> To obtain the offset o
Hi,
Yvan Masson wrote:
> I am really not at ease using tools like hexdump,
I pondered a bit more. If it's an ISO filesystem wrapped into some header
and maybe a footer, then mount option -o offset= could help.
To obtain the offset of the first occurence of "CD001", do
offst=$( expr \
Le 19/12/2022 à 16:34, Thomas Schmitt a écrit :
Hi,
i wrote:
dd if=cdimage.iso bs=1 count=64 | od -t c
Yvan Masson wrote:
000 \0 377 377 377 377 377 377 377 377 377 377 \0 \0 002 \0 001
020 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
This does not give m
Hi,
i wrote:
> >dd if=cdimage.iso bs=1 count=64 | od -t c
Yvan Masson wrote:
> 000 \0 377 377 377 377 377 377 377 377 377 377 \0 \0 002 \0 001
> 020 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
This does not give me ideas.
> >strings cdimage.iso | head -1
Hi Thomas,
Le 19/12/2022 à 13:28, Thomas Schmitt a écrit :
Hi,
Yvan Masson wrote:
I have a CD image of an old Win 95 game. [...]
$ file cdimage.iso
cdimage.iso: data
So the cdimage.iso is not an ISO 9660 filesystem or somehow defaced.
(Does the image file perhaps begin by "RIFFCDXA" ?)
Hi,
Yvan Masson wrote:
> I have a CD image of an old Win 95 game. [...]
> $ file cdimage.iso
> cdimage.iso: data
So the cdimage.iso is not an ISO 9660 filesystem or somehow defaced.
(Does the image file perhaps begin by "RIFFCDXA" ?)
What do you get from the following runs ?
dd if=cdimage
20 matches
Mail list logo