Thanks for the input guys, Il be working on the file mover in a few days.
Btw, I have a script that deletes directories. I made it so that the user writes the folder that needs to be deleted in the current directory. I even ask a yes/no affirmation.
Now, the problem is that if the directory contains stuff it will give me a beautiful message "Directory not empty" message.
So how the hell do I silence the message that pops out (I checked the man, there's not mkdir silent or something).
If the script notices their is indeed a folder with content in it that it will pop out a message like : "Folder contains stuff ect"
Thanks for the input guys, Il be working on the file mover in a few days.
Btw, I have a script that deletes directories. I made it so that the user writes the folder that needs to be deleted in the current directory. I even ask a yes/no affirmation.
Now, the problem is that if the directory contains stuff it will give me a beautiful message "Directory not empty" message.
So how the hell do I silence the message that pops out (I checked the man, there's not mkdir silent or something).
You don't; rmdir will not remove a directory that is not empty. Use rm -rf instead.
Quote:
If the script notices their is indeed a folder with content in it that it will pop out a message like : "Folder contains stuff ect"
Here's my current bash code:
Please put code inside [code] tags, not [quote] tags.
Hopefully Il be able to work on my scripts today. Been doing a lot of HTML and Java hehe
Btw, I don't want my script to be able to delete a whole directory branch. I just want to warn the user that the directory targeted has files in it by popping a message out. (I got others plans for a directory with content in it)
I have a script in which we have used nohup. Once script is executed it will be terminated only when enter key is pressed. I want the script to be terminated without pressing enter key
nohup imqbrokerd -name user_id port 2>1 1>$home_`date` &
I am a newbie to shell, Kindly please help (3 Replies)
I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed.
#!/usr/bin/expect -f... (2 Replies)
hi,
i've bash script thats working...
but now i need to add a line....that prompts for user input....like yes and 1 as complete install....
so here's how it looks...
$ cd 9200 (cd into directory)
$./install (hv to type ./install to run install then ask for)
----do you want to... (4 Replies)
Hi,
I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP)
I have this script working in both AIX and HP-UX.
The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router.
How is this done? (0 Replies)
I'm working on making a menu system on an HP-UX box with Bash on it. The old menu system presents the users with a standard text menu with numbers to make selections. I'm re-working the system and I would like to provide something more akin to iterative search in Emacs.
I have a list of 28... (2 Replies)