Search Results

Search: Posts Made By: Jayden
1,770
Posted By Jayden
Is this a varible type?
Wondering what $@ does - is it a variable of some kind?
1,731
Posted By Jayden
Command Question
What does 'directory=`pwd $1` ' mean, I know pwd is present working directory, so does that command take the present working directory of the directory the user is in depending on the varible ($1)?
14,475
Posted By Jayden
Hey mate, I finally got it working - cheers for...
Hey mate, I finally got it working - cheers for all your help, I'm pretty sure my system will be safe from my error-prone ways.
14,475
Posted By Jayden
Okay, so I tried: if [ $1 ]; then ...
Okay, so I tried:


if [ $1 ]; then
echo "Restoring File..."
mv /home/dustbin/$1 .
elif [$1 "-z" ] ; then
mv $1 .$2
else
echo "That file doesn't exist.";
fi


but it...
14,475
Posted By Jayden
Don't know where I'm going wrong mate, first part...
Don't know where I'm going wrong mate, first part works fine but the - z just ain't working for me, but anyways thanks for your help, at least i won't delete all my files lol - and sorry about not...
14,475
Posted By Jayden
I got: syntax error near unexpected token...
I got:

syntax error near unexpected token `then' and
` else [$1 "-z" ] ; then'

and thanks for the info about the last elif
14,475
Posted By Jayden
I changed my code to this: if [ $1 ];...
I changed my code to this:

if [ $1 ]; then
echo "Restoring File..."
mv /home/dustbin/$1 .

elif [$1 "-z" ] ; then
mv $1 .$2

elif
echo "That file...
14,475
Posted By Jayden
Sorry to bug you again, but I was wondering if it...
Sorry to bug you again, but I was wondering if it was possible to restore the file to a different directory, like of my choosing? Would that require a elif part in the code? with a mv flag?
14,475
Posted By Jayden
Thanks for your help Rhije I changed the name and...
Thanks for your help Rhije I changed the name and it worked - I actually did figure it out lol, and felt completely stupid. But thanks for your help mate.
14,475
Posted By Jayden
*looks sheepish* Ignore that above reply please -...
*looks sheepish* Ignore that above reply please - I realised my mistake
14,475
Posted By Jayden
I have the dustbin file located within the home...
I have the dustbin file located within the home directory, so /home/dustbin

I tried the code you suggested but it's giving me a list of restore options with different flags

restore 0.4b39...
14,475
Posted By Jayden
Restoring to original directory?
Alright there guys, I have a question, obviously, and that would be -

So I don't completely screw up my system, I made a 'dustbin' directory, and made a script where instead of removing the files...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 12:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy