mirror of
				https://gitea.blesmrt.net/mikaela/shell-things.git
				synced 2025-10-31 09:27:20 +01:00 
			
		
		
		
	bashrc & zshrc: fix top10 function
it was missing escaping of \history and it was returning timestamps
This commit is contained in:
		
							parent
							
								
									c6c4fa3d59
								
							
						
					
					
						commit
						e95b5fa006
					
				
							
								
								
									
										2
									
								
								bashrc
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								bashrc
									
									
									
									
									
								
							| @ -618,7 +618,7 @@ JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's | ||||
| # Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j | ||||
| function top10() { | ||||
|     # copyright 2007 - 2010 Christopher Bratusek | ||||
|     history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head | ||||
|     \history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head | ||||
| } | ||||
| 
 | ||||
| # ex command. Copied from bashrc of bioterror ( http://ricecows.org/configs/bash/.bashrc ). Original comment below: | ||||
|  | ||||
							
								
								
									
										2
									
								
								zshrc
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								zshrc
									
									
									
									
									
								
							| @ -591,7 +591,7 @@ JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's | ||||
| # Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j | ||||
| function top10() { | ||||
|     # copyright 2007 - 2010 Christopher Bratusek | ||||
|     history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head | ||||
|     \history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head | ||||
| } | ||||
| 
 | ||||
| # ex command. Copied from zshrc of bioterror ( http://ricecows.org/configs/zsh/.zshrc ). Original comment below: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Mikaela Suomalainen
						Mikaela Suomalainen