scr c de la merde
This commit is contained in:
60
SCR.1.2/corection/correcton
Normal file
60
SCR.1.2/corection/correcton
Normal file
@@ -0,0 +1,60 @@
|
||||
Taf
|
||||
|
||||
ex 1:
|
||||
|
||||
ls -R --full-time TR/
|
||||
ls -lR --time-style=full-iso TR/
|
||||
|
||||
ex 2:
|
||||
|
||||
ls -d TR/lib/host/*5[4-9]* TR/lib/krb5/*[6][0-4]* TR/lib/kernel/*5[4-9]* TR/lib/kernel/*[6][0-7]*
|
||||
|
||||
ex 3:
|
||||
|
||||
find TR/ -name "inout.dev" -> TR/lib/krb5/plugin/inout.dev
|
||||
find TR/ -mindepth 6 -newer TR/lib/krb5/plugins/inout.dev
|
||||
|
||||
ex 4:
|
||||
|
||||
find TR/ -mindepth 8 -maxdepth 8 -type d -exec mkdir '{}'/NEW \;
|
||||
|
||||
ex 5:
|
||||
|
||||
find TR/ -mindepth 8 -maxdepth -type f -execdir tar cvf archive.tar '{}'
|
||||
|
||||
ex 6:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $# -lt 2 ]]
|
||||
then
|
||||
echo "Usage: $0 <display.format> <SRC_FILE>"
|
||||
exit
|
||||
fi
|
||||
if [[ ! -f $2 ]]
|
||||
then
|
||||
echo "File $2 doesnt exist or is not regular."
|
||||
exit
|
||||
fi
|
||||
if [[ $1 != "1" && $1 != "2"]]
|
||||
then
|
||||
echo "Uknown display format. Please submit 1 if no prefix, 2 for prefix"
|
||||
exit
|
||||
fi
|
||||
Cf [[ $1 == "2"]]
|
||||
then
|
||||
pref = "U+"
|
||||
fi
|
||||
while read adde
|
||||
do
|
||||
l=$(expr legnth $addr)
|
||||
p=$(expr index $addr "Q")
|
||||
count=$(expr substr $addr $((p+1)) $((8-p)))
|
||||
p=11
|
||||
while [[ $p - lt $l ]]
|
||||
do
|
||||
cont=$count $(expr $substr $addr $p 6)
|
||||
p=$((p+2))
|
||||
done
|
||||
printf "$pef%x\n" $count
|
||||
done <$2
|
||||
Reference in New Issue
Block a user