mirror of
				https://github.com/Mabbs/mabbs.github.io
				synced 2025-10-31 21:46:37 +00:00 
			
		
		
		
	Restore deleted repositories
This commit is contained in:
		
							
								
								
									
										26
									
								
								_posts/2019-01-27-shell.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								_posts/2019-01-27-shell.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| --- | ||||
| layout: post | ||||
| title: Mayx应聘失败 | ||||
| tags: [应聘, Shell, 运维, 面向时间] | ||||
| --- | ||||
|  | ||||
| 今天,Mayx去某公司面试运维,然后考官出了一道题:    | ||||
| 如何用Linux shell排序?<!--more-->    | ||||
|  | ||||
| Mayx想了想,写出了以下代码: | ||||
| ```shell | ||||
| #!/bin/sh | ||||
| num="4 5 1 9 3 6 7 4 1 12" | ||||
| for j in $num | ||||
| do | ||||
| { | ||||
| sleep $j | ||||
| printf "$j " | ||||
| }& | ||||
| done | ||||
| wait | ||||
| ``` | ||||
| 执行效果:`1 1 3 4 4 5 6 7 9 12`    | ||||
| 然后,Mayx被赶出来了……    | ||||
| 我写的代码明明可以执行,效果也没问题,居然赶我出来,这一定是个垃圾公司!    | ||||
| 后来才知道,他们想让我回答`sort`,果然是垃圾公司(笑) | ||||
		Reference in New Issue
	
	Block a user
	 mayx
					mayx