Added my basic hex/ascii/binary conversion scripts
This commit is contained in:
		
							
								
								
									
										38
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,3 +1,41 @@ | |||||||
| # bash-utils | # bash-utils | ||||||
|  |  | ||||||
| Just a couple bash utilities | Just a couple bash utilities | ||||||
|  |  | ||||||
|  | = a2b - Convert Ascii to Binary = | ||||||
|  | == Usage == | ||||||
|  | ``` | ||||||
|  | a2b H e l l o | ||||||
|  | ``` | ||||||
|  | == Output == | ||||||
|  | ``` | ||||||
|  | 01001000 | ||||||
|  | 01100101 | ||||||
|  | 01101100 | ||||||
|  | 01101100 | ||||||
|  | 01101111 | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | = a2h - Convert Ascii to Hex = | ||||||
|  | == Usage == | ||||||
|  | ``` | ||||||
|  | a2h H e l l o | ||||||
|  | ``` | ||||||
|  | == Output == | ||||||
|  | ``` | ||||||
|  | 48 | ||||||
|  | 65 | ||||||
|  | 6c | ||||||
|  | 6c | ||||||
|  | 6f | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | = h2a - Convert Hex to Ascii = | ||||||
|  | == Usage == | ||||||
|  | ``` | ||||||
|  | h2a 48 65 6c 6c 6f | ||||||
|  | ``` | ||||||
|  | == Output == | ||||||
|  | ``` | ||||||
|  | H e l l o | ||||||
|  | ``` | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								a2b
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								a2b
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | for c in $@; do | ||||||
|  |   echo $c | xxd -b | cut -d" " -f2 | ||||||
|  | done | ||||||
							
								
								
									
										5
									
								
								a2h
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								a2h
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | for c in $@; do | ||||||
|  |   echo $c | xxd -p | cut -c1-2 | ||||||
|  | done | ||||||
		Reference in New Issue
	
	Block a user