Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

passing variables into array

resnuml=`cat h2.pdb | awk '{print $5}' | uniq` # get uniq pattern like 
echo resnuml : 10 11 12 13 14 15

Aresnum=( $resnuml ) # assigning above values into array

echo length : ${#Aresnum[@]}   # Array length. = 6
echo resnums :  ${Aresnum[@]}   # = 10 11 12 13 14 15
echo resnum 0:  ${Aresnum[0]}  # = 10
Comment

PREVIOUS NEXT
Code Example
Shell :: git expo init 
Shell :: mana toolkit install 
Shell :: bash combine Exit command and exit codes to build quick logic 
Shell :: How to remove multiple non empty directory in ubuntu 
Shell :: add space after 7 characters of string 
Shell :: uninstall texlive 2019 in ubuntu 18.4 
Shell :: how to denote spaces in path 
Shell :: install dynamic library gd2 
Shell :: to remember all commands typed in multiple terminal 
Shell :: how to search .class file in unix 
Shell :: build pdf from tex file linux 
Shell :: ncdu exclude 
Shell :: Git Precommit not working on windows 
Shell :: site:stackoverflow.com git clone specific folder 
Shell :: elementary os install window cut off 
Shell :: ls show last item 
Shell :: install gui apps using homebrew 
Shell :: set-executionpolicy unrestricted permission denied 
Shell :: with great power comes great responsibility ubuntu 
Shell :: docker php fpm xsl 
Shell :: run sudo without typing password manually 
Shell :: what is vagrant and system requirements 
Shell :: terminate any process that is using the port number to communicate 
Shell :: install gnuunicorn pip 
Shell :: nmap script location in kali 
Shell :: length 2 
Shell :: docker mongo tutorial 
Shell :: script inside script bash 
Shell :: speed up ubuntu 
Shell :: changed files github 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =