LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   POSIX-Operating System (https://www.linuxquestions.org/questions/linux-newbie-8/posix-operating-system-693539/)

darwins 12-28-2008 08:24 PM

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

Quakeboy02 12-28-2008 08:45 PM

Let me ask you a question: are all your posts homework-related?

pixellany 12-29-2008 05:32 PM

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.

SqdnGuns 12-29-2008 05:42 PM

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.


sundialsvcs 12-29-2008 07:53 PM

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."

SqdnGuns 12-29-2008 08:30 PM

Dude, read his previous threads he started..........right from a homework assignment.

pixellany 12-29-2008 09:51 PM

Quote:

Originally Posted by SqdnGuns (Post 3391051)
Dude, read his previous threads he started..........right from a homework assignment.

Roger that--closed


All times are GMT -5. The time now is 01:10 PM.