Article 55AK0 Bash script, im still new to linux

Bash script, im still new to linux

by
Himeose
from LinuxQuestions.org on (#55AK0)
How to append an existing file?
The existing file in the mywastebasket will have the version number zero appended to it and the newly deleted file will have version number 1 appended to it.
How the loop looks like?

My code be like

#!/bin/sh
read file
mv $file mywastebasket
rm -i /home/himeose/mywastebasket/
So how am i gonna proceed?

Read file from home
At /home/himeose/mywastebasket
I will code this after the bash done
touch home.txt
bash delete.sh
home.txt
Are you sure to delete or not? y

Move the file (at home) to directory (mywastebasket is dir)

Yes we are at /home/himeose/

After rm - i /home/himeose/mywastebasket/

The loop
Mybe i should use
If [ conditional expression1 ]
then
statement1
statement2
.
elif [ conditional expression2 ]
then
statement3
statement4
.
.
.
else
statement5
fi

After the file name appended

I can clear all the file in the mywastebasket dir.
By using alias rm - c = "rm -v"latest?d=yIl2AUoC8zA latest?i=VPj4Bu4H1e4:NDrB2Bbony4:F7zBnMy latest?i=VPj4Bu4H1e4:NDrB2Bbony4:V_sGLiP latest?d=qj6IDK7rITs latest?i=VPj4Bu4H1e4:NDrB2Bbony4:gIN9vFwVPj4Bu4H1e4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments