Upload files to "OS/bash"
This commit is contained in:
		
							parent
							
								
									af4130f9be
								
							
						
					
					
						commit
						30bce06742
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								OS/bash/q1.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								OS/bash/q1.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Enter the name of item to be checked"
 | 
				
			||||||
 | 
					read name
 | 
				
			||||||
 | 
					if [ -f $name ]; then
 | 
				
			||||||
 | 
					echo "File $name exists"
 | 
				
			||||||
 | 
					elif [ -d $name ]; then
 | 
				
			||||||
 | 
					echo "Directory $name exists"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					echo "Neither file or directory"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue