Skip to content

Shell script (mostly awk) for pulling file lists from bodyfile.#432

Merged
tclahr merged 4 commits into
tclahr:developfrom
halpomeranz:bodyfile2filelists
Mar 11, 2026
Merged

Shell script (mostly awk) for pulling file lists from bodyfile.#432
tclahr merged 4 commits into
tclahr:developfrom
halpomeranz:bodyfile2filelists

Conversation

@halpomeranz

Copy link
Copy Markdown
Contributor

I ended up refactoring the original bodyfile2filelists.sh into a version that mostly uses awk for the heavy lifting. The awk version runs orders of magnitude faster than my initial attempt as a portable Bourne shell script that called out to grep each time it needed to do a pattern match.

This is apropos of Issue #416

halpomeranz and others added 3 commits February 8, 2026 11:43
Signed-off-by: Hal Pomeranz <hrpomeranz@gmail.com>
Realized that if we pass in null uidlist or gidlist values then every
file and directory will be marked as unowned. Added new conditional test
to fix.

Signed-off-by: Hal Pomeranz <hrpomeranz@gmail.com>
@tclahr

tclahr commented Mar 8, 2026

Copy link
Copy Markdown
Owner

I noticed you are filtering out only directories from world writable files. I did a test and it seems that all symlinks are also returned as they tend to be 666 or 777.

I was thinking about filtering out symlinks as well.

@halpomeranz

Copy link
Copy Markdown
Contributor Author

I don't see how matching symlinks is possible. The pattern match on line 70 in the code is /^-.......w/. The leading - should mean we only match regular files. And that's what happens in my testing.

@tclahr

tclahr commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Forget about what I said... my bad.

Update artifacts and profiles.
Update bodyfile2filelists.sh to support systems other than Linux.
@tclahr tclahr merged commit dff0c03 into tclahr:develop Mar 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants