LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 12-28-2008, 09:24 PM   #1
darwins
LQ Newbie
 
Registered: Dec 2008
Posts: 18

Rep: Reputation: 0
Smile POSIX-Operating System


Could someone tell me whether the following is true/false
"An operating system that implements the POSIX standard,can run on a wide variety of machines"-true/false
 
Old 12-28-2008, 09:45 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Let me ask you a question: are all your posts homework-related?
 
Old 12-29-2008, 06:32 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
darwins;

In an earlier thread, I expressed my concern about your pattern of never following up in you threads.

Your latest posts re-inforce the suspicion that you are systematically feeding us all your homework questions. If we don't get some kind of feedback from you, then we will have to act on this assumption.
 
Old 12-29-2008, 06:42 PM   #4
SqdnGuns
Member
 
Registered: Aug 2005
Distribution: Slackware64 14.2 w/ CSB & MSB
Posts: 998

Rep: Reputation: 96
darwins,

Impress your instructor with this script.

Save it as homework.sh, make is executable and then run it.

Code:
#!/bin/bash
#  homework.sh: All-purpose homework assignment solution.
#  Author: M. Leo Cooper
#  If you substitute your own name as author, then it is plagiarism,
#+ possibly a lesser sin than cheating on your homework!
#  License: Public Domain

#  This script may be turned in to your instructor
#+ in fulfillment of ALL shell scripting homework assignments.
#  It's sparsely commented, but you, the student, can easily remedy that.
#  The script author repudiates all responsibility!

DLA=1
P1=2
P2=4
P3=7
PP1=0
PP2=8
MAXL=9
E_LZY=99

declare -a L
L[0]="3 4 0 17 29 8 13 18 19 17 20 2 19 14 17 28"
L[1]="8 29 12 14 18 19 29 4 12 15 7 0 19 8 2 0 11 11 24 29 17 4 6 17 4 19"
L[2]="29 19 7 0 19 29 8 29 7 0 21 4 29 13 4 6 11 4 2 19 4 3"
L[3]="19 14 29 2 14 12 15 11 4 19 4 29 19 7 8 18 29"
L[4]="18 2 7 14 14 11 22 14 17 10 29 0 18 18 8 6 13 12 4 13 19 26"
L[5]="15 11 4 0 18 4 29 0 2 2 4 15 19 29 12 24 29 7 20 12 1 11 4 29"
L[6]="4 23 2 20 18 4 29 14 5 29 4 6 17 4 6 8 14 20 18 29"
L[7]="11 0 25 8 13 4 18 18 27"
L[8]="0 13 3 29 6 17 0 3 4 29 12 4 29 0 2 2 14 17 3 8 13 6 11 24 26"
L[9]="19 7 0 13 10 29 24 14 20 26"

declare -a \
alph=( A B C D E F G H I J K L M N O P Q R S T U V W X Y Z . , : ' ' )


pt_lt ()
{
  echo -n "${alph[$1]}"
  echo -n -e "\a"
  sleep $DLA
}

b_r ()
{
 echo -e '\E[31;48m\033[1m'
}

cr ()
{
 echo -e "\a"
 sleep $DLA
}

restore ()
{
  echo -e '\033[0m'            # Bold off.
  tput sgr0                    # Normal.
}


p_l ()
{
  for ltr in $1
  do
    pt_lt "$ltr"
  done
}

# ----------------------
b_r

for i in $(seq 0 $MAXL)
do
  p_l "${L[i]}"
  if [[ "$i" -eq "$P1" || "$i" -eq "$P2" || "$i" -eq "$P3" ]]
  then
    cr
  elif [[ "$i" -eq "$PP1" || "$i" -eq "$PP2" ]]
  then
    cr; cr
  fi
done

restore
# ----------------------

echo

exit $E_LZY

#  A typical example of an obfuscated script that is difficult
#+ to understand, and frustrating to maintain.
#  In your career as a sysadmin, you'll run into these critters
#+ all too often.
 
Old 12-29-2008, 08:53 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,156

Rep: Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204
In case it isn't homework ...

POSIX is a set of standards aimed at application programs. It defines a standard (sic...) set of software interfaces and exactly how those interfaces are supposed to work. (It is also a wonderous example of lexiphanic and therefore utterly-incomprehensible writing!)

Many operating-systems implement (well, "more or less") the POSIX standard interface. (Even Windows implements a fair bit of it.) But this has nothing to do with "the hardware or the range of hardware upon which the operating systems themselves run."
 
Old 12-29-2008, 09:30 PM   #6
SqdnGuns
Member
 
Registered: Aug 2005
Distribution: Slackware64 14.2 w/ CSB & MSB
Posts: 998

Rep: Reputation: 96
Dude, read his previous threads he started..........right from a homework assignment.
 
Old 12-29-2008, 10:51 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by SqdnGuns View Post
Dude, read his previous threads he started..........right from a homework assignment.
Roger that--closed
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking For A Operating System MSDOS Fan Linux - Distributions 11 07-14-2008 09:50 PM
My grub is not loading on dual operating system with windows Xp Pro causing my system marlene tack Linux - Newbie 2 03-17-2008 08:54 AM
Why Linux is best Operating System for Learning/Doing System Programming ? ubaid_t General 6 03-21-2004 03:10 PM
name of the operating system emmanuelmathew Linux From Scratch 5 02-11-2003 10:14 AM
operating system name emmanuelmathew Linux - General 9 02-11-2003 09:39 AM


All times are GMT -5. The time now is 07:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration