Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo $1 $2 $3 $4 $5 $6' <collecting the parameter arguments:'
- a=$1
- b=$2
- c=$3
- #start="$1";
- #end="$3";
- var=( {a..z} )
- for ((x=0; x<=2; x++)); do
- mkdir "$var"
- var="${var[x+1]}"
- done
- if [ $a -gt $b -a $a -gt $c ]
- then
- echo "$a is largest integer"
- max=$a
- elif [ $b -gt $a -a $b -gt $c ]
- then
- echo "$b is largest integer"
- max=$b
- elif [ $c -gt $a -a $c -gt $b ];
- then
- echo "$c is largest integer"
- max=$c
- fi
- echo "maximum find : $max"
- if [ $max -eq $1 ]
- then
- fol=a
- elif [ $max -eq $2 ]
- then
- fol=b
- else
- fol=c
- fi
- #fol="folder_$max"
- echo $fol
- cd $fol
- touch x.txt
- for((i=1;i<=a;i++))
- do echo -e "$4$4$4\n" >> x.txt
- done
- for((i=1;i<=b;i++))
- do echo -e "$5$5$5\n" >> x.txt
- done
- for((i=1;i<=c;i++))
- do echo -e "$6$6$6\n" >> x.txt
- done
- more x.txt
- echo "------------------------"
- echo "$max"
- if [ $max -eq $1 ]
- then
- r=a
- elif [ $max -eq $2 ]
- then
- r=b
- else
- r=c
- fi
- echo "$r$r$r is replaced by ddd "
- echo "------------------------"
- sed -i "s|$r$r$r|ddd|g" x.txt
- cat x.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement