You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made a simple script that can be added to ~/.config/cfiles/scripts/cpself
#!/bin/bash
# version .2 fixed names with spaces
#
folder="$(printf "%s" "$1" | sed 's|\(.*\)/.*|\1|')"
file="$(printf "%s" "$1" | sed 's|.*/||')"
echo "Entering $folder "
cd "$folder"
if [ "$?" != "0" ]; then
echo "Failed to enter folder $folder "
echo "Exiting..."
read -r leave
exit 1
fi
NAME () {
printf "Copy %s -> " "$file"
read -r name
}
NAME;
while [ -f "$name" ]; do
echo "The name \"$name\" already exists in this folder."
NAME;
done
cp -v "$file" "$name"
The text was updated successfully, but these errors were encountered:
I've made a simple script that can be added to ~/.config/cfiles/scripts/cpself
The text was updated successfully, but these errors were encountered: