Skip to content
Snippets Groups Projects
Verified Commit ace7155b authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Add fcut, fcopy and fpaste scripts

parents
No related branches found
No related tags found
No related merge requests found
fcopy 0 → 100755
#!/bin/bash
set -e
if [[ "$#" -lt "1" ]]; then
echo "Usage: $0 FILE [FILE ...]";
echo "Copies files to clipboard"
exit 1;
fi
mkdir -p ~/.clipboard
cp -a $@ ~/.clipboard/
fcut 0 → 100755
#!/bin/bash
set -e
if [[ "$#" -lt "1" ]]; then
echo "Usage: $0 FILE [FILE ...]";
echo "Moves files to clipboard"
exit 1;
fi
mkdir -p ~/.clipboard
mv $@ ~/.clipboard/
fpaste 0 → 100755
#!/bin/bash
set -e
if [[ "$#" -gt "1" ]]; then
echo "Usage: $0 [DESTINATION]";
echo "Paste files from clipboard to destination of cwd."
exit 1;
fi
mkdir -p ~/.clipboard
files=$(find ~/.clipboard -maxdepth 1 -mindepth 1)
if [[ -z "$files" ]]; then
echo "Clipboard is empty"
else
mv $(find ~/.clipboard -maxdepth 1 -mindepth 1) ${1:-.}
fi;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment