scripts tp crsamba
This commit is contained in:
		
							
								
								
									
										22
									
								
								sio1/sisr1/18-bash/tpbash/crsamba3
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								sio1/sisr1/18-bash/tpbash/crsamba3
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
usage() {
 | 
			
		||||
	echo "usage : $0 <users.txt>"
 | 
			
		||||
	exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if [[ $# != 1 ]] ; then
 | 
			
		||||
	usage
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
fich=$1
 | 
			
		||||
if [[ ! -r $fich ]] ; then
 | 
			
		||||
	echo "i$0: erreur ouverture fichier $fich"
 | 
			
		||||
	exit 2
 | 
			
		||||
fi
 | 
			
		||||
while read ligne
 | 
			
		||||
do
 | 
			
		||||
	echo $ligne
 | 
			
		||||
done < $fich
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user