osy practical questions solved
osy practical questions solved
osy practical questions solved
### 3) State names of latest multi-user operating system and its advantages.
- **Command Line OS**: e.g., Linux Terminal. Users interact via text commands.
- **GUI OS**: e.g., Windows 10. Users interact through graphical icons.
### 6) Write down different options for cal commands (Any 5):
### 10) Write and Execute file and directory manipulation commands:
### 12) Write and Execute file and directory manipulation commands:
- `:q`: Quit.
- `:q!`: Force quit without saving.
- `:wq`: Save and quit.
```bash
#!/bin/bash
echo "Enter three numbers: "
read a b c
if [ $a -gt $b ] && [ $a -gt $c ]; then
echo "$a is greatest."
elif [ $b -gt $c ]; then
echo "$b is greatest."
else
echo "$c is greatest."
fi
```
### 21) Difference between If [condition] and If ((condition)):
```bash
#!/bin/bash
echo "Enter n: "
read n
a=0
b=1
echo "Fibonacci series:"
for (( i=0; i<n; i++ ))
do
echo -n "$a "
fn=$((a + b))
a=$b
b=$fn
done
echo
```
```bash
#!/bin/bash
for i in {2..10}; do
echo "Table of $i:"
for j in {1..10}; do
echo "$i * $j = $((i * j))"
done
echo
done
```
```bash
#!/bin/bash
echo "Enter source file name:"
read source
echo "Enter destination file name:"
read dest
cp $source $dest
echo "File copied."
```