Re: Need fstab-decode for CentOS 8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 3/1/22 10:29, Gordon Messmer wrote:

Chris Schanzle mentioned off-list that a tab character had been replaced with spaces (I *knew* that should have been an attached file, shame on me).  He also suggested an improvement that removes the tab character, so here's a second try.


Or not?  Last try.


#!/bin/sh

declare -a cmdline
tab=$'\t'
eol=$'\n'

for arg in "$@"
do
  arg="${arg//\\011/$tab}"
  arg="${arg//\\012/$eol}"
  arg="${arg//\\040/ }"
  arg="${arg//\\134/\\}"
  arg="${arg//\\\\/\\}"
  cmdline+=("$arg")
done

"${cmdline[@]}"

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux