Currently taking my first linux course in college and am stuck on a project...details he https://aacc.instructure.com/courses...item_id=614603
So far this is the code I have come up with but get an error on the 42nd line where it says done. I am not an expert by any means but would like to not struggle and finish this project. Below is my code...any input welcome.
#!/bin/bash
#blinker
#creates a bi-stable process that displays ON and OFF
touch .running
clear
while [ -f .running ]
do
count=0
while [ -f .running ]
do
count=$((count+1))
if [ $count -gt 4 ]
then
break
fi
echo "Green"
sleep 4
done
count=0
while [ -f .running ]
do
count=$((count+1))
if [ $count -gt 4 ]
then
break
fi
echo "red"
sleep 4
count=0
while [ -f .running ]
do
count=$((count+1))
if [ $count -gt 2 ]
then
break
fi
echo "green"
sleep 2
count=0
while [ -f .running ]
do
done
done
Good day everyone,
I'm currently a student and as far as I'm aware I still need windows for some program I need, but I am going over to Linux.
(Thus I'm running Windows 8 at this moment)
Today I was going to install Ubuntu 14.04.01 alongside Windows 8, everything went well till I hit the 4th step (Installation type page) of the installation:
A message like follows showed:
"This computer currently has Debian GNU/Linux (Kali Linux 1.0.7) on it. What would you like to do?"
There are then 3 options available:
1) Install Ubuntu alongside Debian GNU/Linux (Kali Linux 1.0.7)
2) Replace Debian GNU/Linux (Kali Linux 1.0.7) with Ubuntu
3 and 4 is greyed out.
5) Something else (You can create resize partitions yourself, or choose multiple partitions for Ubuntu.
I just want to make sure what option to choose, I cant afford to lose all my data and windows.
Problem: Showing Kali Linux as current OS and not Windows 8.
Possible reason for showing Kali Linux as current OS:
I have a live CD of Kali Linux and ran it a few times in the past, but according to my knowledge it shouldn't have changed anything.
Maybe the 1st option is still the right one even though the current OS isn't listed right? Or the 3rd option is like a manual setting I guess.
Thanks for the time reading and helping!
I am running Linux Fedora 20. I have tried several times to download drivers; the last message I received said "There was an error during the cups operation: 'client-error-document-format-not-supported'. I'm totally confused now and do not know what to do next. I need help please. I think I should start from scratch.
when running leach. i got different leach.out
first i was confusing is it correct or no.
for example, one of them show that there is a collision. some times one TDMAschedule.txt file generated and some times more than one.
every time i run leach_test the out put differ. but i notice that in coditions.txt ==> the desired number of clusters is always 1
first, how can i change this value. and how it will effect on leach.out?
second, i need some illustration on how to understand leach.out to be able to determine it is correct or not.
thanks in advance
hi all,
i am trying to Register to Kali Linux Forum and for some reason
i cant complete the registration i've also searched for solution at google but without success each time i try to complete the registration its writes : The solution of task you submitted was incorrect. Please read the instruction and try again.
and if i understand right they mean the picture suppose to be exactly as the picture at the top right corner and i did it like atleast 30 times and always got this error
i really need some help with it any help would be appreciated
I am having problems with my Sony Vaio windows
it boots up saying (on a black screen, grey text):
==============================================
Windows Boot Manager
Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:
1. Insert your Windows installation disc and restart your computer.
2. Choose your language settings, and then click "Next."
3. Click "Repair your computer."
If you do not have this disc, contact your system administrator or computer manufacturer for assistance.
Status: 0xc0000225
Info: The boot selection failed because a required device is inaccessible.
Enter=Continue ESC=Exit
==========================================
No matter how many times i tried to restart and even tried F10 repeatedly or Alt-F10 I can't get to any other screen other than the above screen.
So I thought ah to hell with windows on this machine. I'll just install a linux distro because it's for my uncle all he really needs is internet and watch youtube videos/movies.
I have successfully burned and installed Fedora before on other machines using LiveCDs when they had CDs.
This time I tried to burn the DVD since it's it doesn't fit on the CD (I got my ISO from http://download.fedoraproject.org/pu...86_64-21-5.iso)
But when i inserted my DVD and restarted the same black screen appears.
So i have been looking for an older version of Fedora that fits on a CD (I am thinking maybe it'll boot from a CD, not sure though) but can't find any.
Any thoughts or solution to my problem?
Thanks in advance.
I have installed httpd, mysql, php on a centos machine. Php executes in the browser of my machines website, mysql can be ran from the command line, but mysql within php in a browser will not work.
I know my code is syntactically correct since it will run on another Centos Lamp machine and NetBeans says it is.
My code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="300">
<title> Freeze Warn Points table Query"</title>
</head>
<body>
<?php
include("config.php");
echo $dbhost;
echo "<br />\n";
echo $dbuser;
echo "<br />\n";
echo $dbpasswd;
echo "<br />\n";
mysql_connect($dbhost, $dbuser, $dbpasswd) or die("Unable to connect to database");
echo 'Connected Successfully';
mysql_select_db($dbname);
echo "zone"." ";
echo "currentLow"." "."dateLastRep"." ";
echo "priority"." "."siteId"." &nbs p; "."siteName";
echo "<br />\n";
$result = $sql = 'SELECT zone, currentLow, dateLastRep, pri, siteId, siteName from points order by zone, pri';
$numRows = mysql_num_rows($result);
echo "Matches: ".mysql_num_rows($result);
for($a=0; $a<$numRows; $a++)
{ $rowArray = mysql_fetch_row($result);
echo $rowArray[0]." ".$rowArray[1]." ".$rowArray[2]." ".$rowArray[3]." ".$rowArray[4]."  ".$rowArray[5]."<br />";
}
mysql_close();
?>
</body>
</html>
When executed on the CENTOS lamp machine in question out puts this
"; $result=mysql_query("SELECT rpad(zone,6,'-'), rpad(currentLow,13,'-'), rpad(dateLastRep,13,'-'), rpad(pri,8,'-'), rpad(siteId,6,'-'), siteName from points order by zone, pri"); $numRows = mysql_num_rows($result); for($a=0; $a<$numRows; $a++) { $rowArray = mysql_fetch_row($result); echo $rowArray[0]." ".$rowArray[1]." ".$rowArray[2]." ".$rowArray[3]." ".$rowArray[4]." ".$rowArray[5]."
"; } mysql_close(); ?>
When I put the same code in the other machine, (it does not have the mysql database so it will not connect) displays this
204.227.112.31
apache
password
Unable to connect to database
httpd is running of course
mysqld is running
I have
mysql-server-5.1.73-3.el6_5.x86_64
php-mysql-5.3.3-40.el6_6.x86_64
mysql-devel-5.1.73-3.el6_5.x86_64
mysql-libs-5.1.73-3.el6_5.x86_64
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
mysql-5.1.73-3.el6_5.x86_64
php-mbstring-5.3.3-40.el6_6.x86_64
php-odbc-5.3.3-40.el6_6.x86_64
php-imap-5.3.3-40.el6_6.x86_64
php-mysql-5.3.3-40.el6_6.x86_64
php-xml-5.3.3-40.el6_6.x86_64
phpmyadmin-2.11.11.3-2.el6.rf.noarch
php-cli-5.3.3-40.el6_6.x86_64
php-xmlrpc-5.3.3-40.el6_6.x86_64
php-gd-5.3.3-40.el6_6.x86_64
php-5.3.3-40.el6_6.x86_64
php-pdo-5.3.3-40.el6_6.x86_64
php-common-5.3.3-40.el6_6.x86_64
php-ldap-5.3.3-40.el6_6.x86_64
php-pear-1.9.4-4.el6.noarch
Installed.
I checked the php.ini files and the httpd.conf files with the LAMP machine it works on and have been unable to find any discrepancies.
Unless I missed something.
Selinux is disabled.
I know it is not my code, but some type of setting somewhere on my machine, I have not been able to find.
I have been unable to find any thing like this issue.
Thanks,
Nancy
Hello
I'm trying to install arch based distro antergos on my system. I have slow but stable internet connection (512 kbps). But unfortunately, in the area I live, there is frequent power cuts. This is creating problem for me. It takes at least 4-5 hours to install antergos linux. Every time installation almost finishes, there will be a power cut, and i have to start it again. This happened 4-5 times, and i have wasted 2 days just trying to install this distro. Still unsuccessful. This incomplete installed linux boots to 'Grub Rescue' screen.
Is there any way I can continue installation from where it went down?
Really be grateful, if someone tells me how, or atleast redirect me to any knowledge base.
Thanks
Dear Friends ,
My date value shows One hour ahead from the present time in BDT . I stay on Asia/Dhaka zone and +6.00 . Please look @ the below output :
------------------------------------------------------------
[root@pbldc-ntpsrv Asia]# cat /etc/sysconfig/clock
# The ZONE parameter is only evaluated by system-config-date.
# The timezone of the system is defined by the contents of /etc/localtime.
ZONE="Asia/Dhaka"
UTC=true
ARC=false
-------------------------------------------------------------
But , My problem is , the below Date command output shows 'BDST' instead of 'BDT' .
------------------------------------
"[root@pbldc-ntpsrv Asia]# date
Sat May 9 16:59:37 BDST 2015
-------------------------------------
But it should be :
---------------------------------
[root@pbldc-ntpsrv Asia]# date
Sat May 9 15:59:37 BDT 2015
---------------------------------
---------------------
[root@pbldc-ntpsrv ~]# date +Z
BDST --Should be BDT
[root@pbldc-ntpsrv ~]# date +%z
+0700 --Should bt +0600
[root@pbldc-ntpsrv ~]#
------------------------------------
How I fix it in redhat lnux 5.5 server .
Dear Sir.
U-boot version : 2015.01
I'm setting some env value. for example see below.
Code:
U-boot > printenv
serial_number=abcdefg
I'm want to "serial_number" pass to kernel cmdline.
So, I'm make a "bootargs" env value. see below.
Code:
U-boot > printenv
bootargs='console=ttyS0,115200 board_serial=${serial_number}'
But, i was failed that env serial_number pass to kernel.
Code:
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyS0,115200 board_serial={serial_number}
How can u-boot env variable pass to kernel?
Thank you.