Search Results

Search: Posts Made By: gangsta
Forum: Linux 04-05-2012
2,119
Posted By gangsta
Setting up slave DNS?
can someone point me in the right direction im trying to setup a Slave dns server

this is my named.conf file

zone "website1.org" {
type slave;
file"mydb-for-website1-org";
notify NO;
};and...
1,162
Posted By gangsta
for i in {1..$tags1} what does this line...
for i in {1..$tags1}


what does this line mean and why is it it a 1 and 2 dots?
1,162
Posted By gangsta
loop to display whatever number use types
sorry couldnt think of a proper title lol

ok i have the following script it asks the user how many html tags they want. Im not sure how to display 2 tags if the user eneters the want only 2 tags...
882
Posted By gangsta
sorry about that, i was trying to fix up the...
sorry about that, i was trying to fix up the spacing and everything. But the script works, but i cant solve my problem of displaying the menu options again after executing option 3
882
Posted By gangsta
loop help
Ok i have this code below when i enter option 3, once it goes through and that part is done, i cant get it to display the menu options again. It only works with "break ;;" but the break just exits...
7,244
Posted By gangsta
sorry that was a mistake i making changes, i...
sorry that was a mistake i making changes, i finished editing it
7,244
Posted By gangsta
ok heres the script, CAT still doesnt work ...
ok heres the script, CAT still doesnt work

while true
do
clear
echo "Menu Options: "
echo "1. Create Script"
echo "2. Show Script"
echo "3. Exit"
echo " Choose: "
read options
...
7,244
Posted By gangsta
yes that worked but when i store something...
yes that worked

but when i store something in a file and i do cat $WEB, shouldnt it show me the contents of that file?
7,244
Posted By gangsta
there is nothing wrong with the script it...
there is nothing wrong with the script it something wrong with the temporary file part

WEB=$(mktemp -t WEB.XXXXXXXXXX)

cat $WEB

that is all, i cannot cat the $web variable to view its...
7,244
Posted By gangsta
just cat $WEB doesnt work it still gives the...
just cat $WEB doesnt work it still gives the error

cat: /tmp/WEB.i077x1v6mW: No such file or directory
2)
echo "Here is the code:"
cat /tmp/$WEB

break;;


cant get it to work, cat $WEB...
7,244
Posted By gangsta
it doesnt work, i tried to add the -> .XXXXXXXXX ...
it doesnt work, i tried to add the -> .XXXXXXXXX
didnt work

cat /tmp/$WEBits option 2 in my loop, when i enter 2 nothing happens

edit i changed the ;; to break;;

but i get this error
...
7,244
Posted By gangsta
yea its stored in temp, how would i cat the file...
yea its stored in temp, how would i cat the file like

cat ~/tmp/$WEB ?
7,244
Posted By gangsta
so this line is to create the temp file? Where is...
so this line is to create the temp file? Where is it being created?
htmlcode=$(mktemp -t htmlcode.XXXXXXXXXX)and this is to forward the text into the temp file
echo "$text" >> $htmlcode
7,244
Posted By gangsta
temporary file to file then move to directory
Ok in my bash script i have 5 options to create a simple html script. I need to create a temporary file and whatever the user types will be stored in that file using html codes. And then I have...
6,627
Posted By gangsta
edit i got it working thnks after the user...
edit i got it working thnks

after the user presses how would i "clear" the screen" so only the error messages are displayed?

trying to figure out where to put clear
6,627
Posted By gangsta
its in a script, and i replaced all the ' with " ...
its in a script, and i replaced all the ' with "

this is what im trying

function trap_ctrlC()
{
echo "Exited."
read -p "Press Enter to exit " exitS
exit 0
}

trap trap_ctrlC 2
6,627
Posted By gangsta
nothing happens when i press control c? It justs...
nothing happens when i press control c? It justs exits out no message is displayed
2,260
Posted By gangsta
In the above after pressing option 1, after...
In the above after pressing option 1, after everything is done in that part how would i get it to display all the options again so user can choose another option?
6,627
Posted By gangsta
ctrl c trapping signal
im trying to make a trap signal 2 (ctrl c) in a bash script

if a user presses ctrl c while running the script it should display an error message but not quit the bash script just yet. User will...
2,773
Posted By gangsta
yea same thing for me but i only want it to show...
yea same thing for me but i only want it to show "How many cars to enter" the one time after that if a wrong answer is entered it should only be "Invalid number. Re-enter"
2,773
Posted By gangsta
how do i make the error message only to be...
how do i make the error message only to be displayed if a wrong answer is diplayed?

while true
do
read -p "How many cars to enter: " tot
[ $tot -ge 0 ] 2>/dev/null && break
echo...
2,773
Posted By gangsta
this is what i have read -p "How...
this is what i have


read -p "How many cars to enter:" cars
until "$cars" [ -ne 1 ] && grep "[a-zA-Z]"
do
read -p "Invalid number. re-enter:" cars
done
2,773
Posted By gangsta
well im doing something similar just checking if...
well im doing something similar just checking if only a number is entered no letters can be entered. If a number is entered it should continue to the next part of the bash script. If a letter is...
2,773
Posted By gangsta
is there a way after the "then" to just continue...
is there a way after the "then" to just continue in the script without displaying the error message?

if [ $? -eq 0 ]
then
echo "One of the input in not an integer"
exit
fi
1,415
Posted By gangsta
only a number can be entered no letters?
ok the user can only enter a number if a letter is entered it shouldnt be accepted
This is what i have so far


read -p "How many cars to enter:" cars
until [ "$cars" -ge 1 -a "$cars" -ne...
Showing results 1 to 25 of 47

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