Missing Validation #11

Open
opened 2026-02-02 15:20:43 -05:00 by jared · 0 comments
Owner

get_cpu_info() {
cpu_info=$(grep -m 1 -w 'model name' /proc/cpuinfo | awk -F: '{print $2}' | xargs)
echo -e "${GREEN}CPU Model:${NC} $cpu_info" # No check if empty
}

Improvement: Validate variables before using them.

get_cpu_info() { cpu_info=$(grep -m 1 -w 'model name' /proc/cpuinfo | awk -F: '{print $2}' | xargs) echo -e "${GREEN}CPU Model:${NC} $cpu_info" # No check if empty } Improvement: Validate variables before using them.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/proxDoc#11