Update OS/bash/Week2/answers.md
This commit is contained in:
		
							parent
							
								
									800dcbc077
								
							
						
					
					
						commit
						277bd63efa
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -7,6 +7,7 @@ Q2.
 | 
			
		|||
	- `grep ' ' *`
 | 
			
		||||
	- `grep '[0-9]' filename > outputfile`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q3. 	- `grep -c "ICT" ITStudents.txt`
 | 
			
		||||
	- `sed 's/:IT:/:Information Technology:/g' students.txt > ITStudents.txt`
 | 
			
		||||
	- `sed awk -F: '$1 == "1234" { avg = ($6 + $7 + $8) / 3; print avg }' students.txt`
 | 
			
		||||
| 
						 | 
				
			
			@ -15,7 +16,9 @@ Q3. 	- `grep -c "ICT" ITStudents.txt`
 | 
			
		|||
 | 
			
		||||
Q4.	- `grep -rl "MIT" . | xargs sed -i 's/MIT/Manipal Institute of Technology/g'`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q5.	- `find . -type f -name '*[0-9]*' -exec wc {} +`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q6. 	- `for i in {1..5}; do wc example.txt & done`
 | 
			
		||||
	- `pkill wc`
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue