CS 505 Linux LAB Experiments
CS 505 Linux LAB Experiments
1. cd - change directory
6. cp - copy a file
nano wlcc.txt
To display the number of lines, words, and characters in the file, use:
wc wlcc.txt
Output:
3 12 60 wlcc.txt
Explanation:
file1.txt:
John
Alice
Bob
Charlie
file2.txt:
Alice
Bob
David
Eve
Output:
Alice
Bob
Explanation:
ls -i filename
For example:
ls -i wlcc.txt
Output:
12345 wlcc.txt
Explanation:
Example:
Explanation:
:!command
Example:
:!ls
#!/bin/bash
args=("$@")
echo "${args[i]}"
done
Make it executable:
chmod +x reverse_args.sh
Output:
orange
banana
apple
Explanation: