简体   繁体   中英

Multiple values for IFS in shell scripting

I am coding a shell program which needs to have multiple internal field separator values - <newline><tab><.><space> . Is there any way to assign all these to IFS? Also I am not talking about awk here.

In bash you can re-assign those multiple values like this:

IFS=$'\n\t. '

In other shells you have to do it manually or use other external commands to generate it:

IFS="
    . "

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM