lehrkraefte:snr:informatik:glf22:python-schullaptops

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
lehrkraefte:snr:informatik:glf22:python-schullaptops [2023/06/09 17:35]
Karlheinz Schubert
lehrkraefte:snr:informatik:glf22:python-schullaptops [2023/06/09 18:50]
Karlheinz Schubert
Line 23: Line 23:
 #!/bin/bash #!/bin/bash
  
-echo "Do you wish to remove all files from '/home/tech-lab'?" +#!/bin/bash 
-select yn in "Yes" "No"; do +read -p "Do you wish to remove all files from '/home/tech-lab'?" yn 
-    case $yn in +case $yn in 
-        Yes )  +    [Yy]* )  
-            echo "Refresh user profile tech-lab" +        echo "Refresh user profile tech-lab" 
-            # rm -rdf * +        cd /etc/skel/ 
-            # rm -rdf .* +        if [[ $PWD/ != /home/tech-lab ]]; then  
-            # cd /etc/skel/ +            echo "$PWD not /home/tech-lab !"
-            # cp -r . /home/tech-lab +
-            # cd /home/tech-lab +
-            # sudo chown tech-lab .* +
-            # sudo chgrp tech-lab .* +
-            break;; +
-        No )  +
-            echo "Nothing done"+
             exit;;             exit;;
-    esac +        fi 
-done+        # rm -rdf * 
 +        # rm -rdf .* 
 +        cd /etc/skel/ 
 +        cp -r . /home/tech-lab 
 +        cd /home/tech-lab 
 +        sudo chown tech-lab .* 
 +        sudo chgrp tech-lab .* 
 +        break;; 
 +    [Nn]* )  
 +        echo "Nothing done
 +        exit;; 
 +    * ) 
 +        echo "Input not recognized" 
 +        exit;; 
 +esac 
 + 
 + 
 + 
 </code> </code>
  
  
  • lehrkraefte/snr/informatik/glf22/python-schullaptops.txt
  • Last modified: 2023/06/09 19:08
  • by Karlheinz Schubert