Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash for tuple

OLDIFS=$IFS # save the old splitting char
IFS=',' # define the splitting char

for i in c,3 e,5 
do 
	set -- $i
    echo $1 and $2
done

IFS=$OLDIFS # reset to original char

-----------------------------------------------
RESULT:

c and 3
e and 5
Comment

bash for tuple

OLDIFS=$IFS # save the old splitting char
IFS=',' # define the splitting char

for i in c,3 e,5 
do 
	set -- $i
    echo $1 and $2
done

IFS=$OLDIFS # reset to original char

-----------------------------------------------
RESULT:

c and 3
e and 5
Comment

PREVIOUS NEXT
Code Example
Shell :: uninstall packages atom 
Shell :: redis sentinel get master ip 
Shell :: bash forward argv to command 
Shell :: fatal: unable to create thread: fatal: fetch-pack: invalid index-pack output 
Shell :: git flow feature finish without deleting branch 
Shell :: bash script perform root access check 
Shell :: how to change branch name 
Shell :: manjaro network driver installed but not working 
Shell :: Postgres - FATAL: database files are incompatible with server 
Shell :: how to install brew on jelastic 
Shell :: quasar pug 
Shell :: Linux using GitHub 
Shell :: how to get mcp23017 input in binary shell 
Shell :: git submodule update init no url found 
Shell :: How to install KVM and VirtManager on Kali Linux 
Shell :: git create new repo in git bash/ terminal 
Shell :: git add everything except 
Shell :: how to clone pull all repositories from github 
Shell :: how to remove git config property 
Shell :: where do you install composer 
Shell :: how to do a pull request with one commit 
Shell :: configure: error: "curses not found" 
Shell :: Optimize images like Photoshop Bulk 
Shell :: mnt d wsl 
Shell :: gatsby image 
Shell :: list all users ubuntu 20.04 
Shell :: mac bash_profile file not b eing sources 
Shell :: install zeek on ubuntu 18.04 
Shell :: yacc install in kali linux 
Shell :: cut powershell 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =