tests/posix: dd(1p) #23

Open
opened 2023-12-30 08:44:13 -07:00 by trinity · 1 comment
Owner

In order to go about implementing dd(1) in a shell script we must first have feature parity. dd(1p) does the following things:

  • input/output direction (dd if=in of=out) and control (dd ibs=1024 obs=128 skip=5 seek=10 count=1) - see dj(1), #15
  • case conversion (dd conv=lcase, dd conv=ucase)
  • endianness swapping (dd conv=swab) - see swab(1), #22
  • character set conversion (dd conv=ascii, dd conv=ebcdic, dd conv=ibm)
  • block alignment stuff (dd conv=block, dd conv=ublock)
In order to go about implementing [dd(1)](https://www.man7.org/linux/man-pages/man1/dd.1p.html) in a shell script we must first have feature parity. dd(1p) does the following things: - input/output direction (`dd if=in of=out`) and control (`dd ibs=1024 obs=128 skip=5 seek=10 count=1`) - see dj(1), #15 - case conversion (`dd conv=lcase`, `dd conv=ucase`) - endianness swapping (`dd conv=swab`) - see swab(1), #22 - character set conversion (`dd conv=ascii`, `dd conv=ebcdic`, `dd conv=ibm`) - block alignment stuff (`dd conv=block`, `dd conv=ublock`)
Author
Owner

Emma and I have discussed a solution to input/output direction, mm(1), which will replace cat(1p) and tee(1p). I've yet to write a utility proposal though.

Emma and I have discussed a solution to input/output direction, mm(1), which will replace cat(1p) and tee(1p). I've yet to write a utility proposal though.
emma changed title from dd(1p) to tests/posix: dd(1p) 2023-12-30 11:05:18 -07:00
emma added the
enhancement
label 2023-12-30 11:05:42 -07:00
emma changed title from tests/posix: dd(1p) to tests/posix: `dd(1p)` 2024-01-23 15:07:53 -07:00
trinity self-assigned this 2024-01-29 16:25:20 -07:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/harakit#23
No description provided.