Загрузил(а) файлы в ''

Kotov_Alexei 2 years ago
parent a2f2108205
commit ae701c75b8
  1. 7
      hw3_ex10.sh
  2. 10
      hw3_ex6.sh
  3. 4
      hw3_ex7.sh
  4. 9
      hw3_ex8.sh
  5. 3
      hw3_ex9.sh

@ -0,0 +1,7 @@
#!/bin/bash
uniq_colors=$( awk -F';' '!seen[$5]++ {if($5!="color")print($5)}' test.txt )
for i in $uniq_colors
do
COUNT=1
awk -v s=$i -v COUNT=$COUNT -F';' '{ if ($5==s) {{ COUNT++ } if (COUNT%2==1) {var1=sin($4)/cos($4); printf($2"\t"); printf("%.4f\n",var1)} } }' test.txt
done

@ -0,0 +1,10 @@
#!/bin/bash
read WORD
REV=$(echo $WORD | rev)
echo $REV
if [ "$REV" = "$WORD" ]
then
echo '**YES**'
else
echo '**NO**'
fi

@ -0,0 +1,4 @@
#!/bin/bash
while IFS= read -r line; do
factor $line >> $2
done < $1

@ -0,0 +1,9 @@
#!/bin/bash
find . -type f -mtime -2 ! -mmin -1 ! -name '*.sh' -print0 |
while IFS= read -r -d '' line
do
part1=$(dirname "$line")
part2=$(basename "$line")
mv $line $part1'/'$add$part2
done

@ -0,0 +1,3 @@
#!/bin/bash
s=$(cal|cat -vet|grep -o '_^H.'|grep -o '[[:digit:]]')
echo $s | sed 's/ //g'
Loading…
Cancel
Save