mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-24 17:06:27 -05:00
add a case substitution function
This commit is contained in:
parent
7ca239a84e
commit
21e06809b3
1 changed files with 4 additions and 0 deletions
|
|
@ -49,6 +49,10 @@ escape_sed() {
|
|||
echo "$1" | sed -e 's/[]\/$*.^[]/\\&/g'
|
||||
}
|
||||
|
||||
case_sed() {
|
||||
echo "$1" | sed 's/.*/\L&/'
|
||||
}
|
||||
|
||||
# Check if the mount point exists and if a USB drive is plugged in
|
||||
usb_path=$(lsblk -o NAME,FSTYPE,SIZE,TYPE,MOUNTPOINT | grep -E "vfat|ext4|ntfs|exfat" | grep -E "sd[a-z]([0-9]*)" | awk '{print $1}' | sed 's/[^a-zA-Z0-9]//g' | head -n 1)
|
||||
full_device_path="/dev/$usb_path" # Construct the full device path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue