mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	Filename globbing strings are not good to happen to noderanges. Use quotes to avoid it in script. Caller still needs to be careful to quote/escape on their end.
		
			
				
	
	
		
			19 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| f=1                                                                    
 | |
| p=0                                                                    
 | |
| for i in `nodels "$1"`; do
 | |
|     if [ "$f" = 1 ]; then                                              
 | |
|         f=0                                                            
 | |
|     	qdate=$((`date +%s`+5))
 | |
|         tmux new-session -d -s tcons.$$ -x 800 -y 800 "rcons $i;if [ \`date +%s\` -lt $qdate ]; then echo Press enter to close; read qdate; fi"       
 | |
|         continue                                                       
 | |
|     fi                                                                 
 | |
|     tmux select-pane -t $p                                             
 | |
|     p=$((p+1))                                                         
 | |
|     qdate=$((`date +%s`+5))
 | |
|     tmux split -h "rcons $i;if [ \`date +%s\` -lt $qdate ]; then echo Press enter to close; read qdate; fi"
 | |
|     tmux select-layout tiled
 | |
| done                                                                   
 | |
| tmux select-pane -t 0
 | |
| tmux attach -t tcons.$$                                                
 |