Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===ZAD 1===
- echo "Szukanie plików w "$PWD
- files=$(ls -p | egrep "[/]$")
- for file in $files; do
- ls -al ./$file | egrep "\-r.*" > /dev/null
- if [[ $? -eq 0 ]]; then
- echo $file
- fi
- done
- exit 0
- ===ZAD 2===
- #!/usr/bin/env bash
- if [[ $# -eq 0 ]]; then
- echo "Podaj argumenty."
- else
- liczbaArgumentow=$#
- for (( i = 0; i < $liczbaArgumentow; i++ )); do
- if [[ ! -r $1 ]]; then
- echo $1" nie jest do odczytu"
- else
- echo $1
- files=$(cat $1 | egrep " CPU[ ,.]")
- count=0
- for file in $files; do
- let count=count+1
- done
- echo $count
- fi
- shift 1
- done
- fi
Advertisement
Add Comment
Please, Sign In to add comment