Horje
bash "read -p" Code Example
bash "read -p"
Line 5:  FIDE
INST_DESC:  DIAM Co Ltd/Japan => MAID Co Ltd/Japan
INST_NME:  DIAM Co Ltd/Japan => MAID Co Ltd/Japan


Line 6:  FIDE
INST_DESC:  DIAM DL/Pimco US Bond Open Born in the USA => MAID DL/Pimco US Bond Open Born in the USA
INST_NME:  DIAM DL/Pimco US Bond Open Born in the USA => MAID DL/Pimco US Bond Open Born in the USA
Source: www.unix.com
bash "read -p"
awk 'NR == FNR {
  /^[ \t]*\47name/ && c++      # get the field number
  if (/^[ \t]*\47size/) {
    split($0, t, ":")          
    gsub(/[ \t\47,]/, x, t[2]) # strip punctuation
    fmt[c] = t[2]              # get the size 
    }
  next                         # run the above actions                                     
  }                            # + only for the first input file
{ 
  for (i=1; i<=NF; i++)        # output the strings in the correct format
    printf "%" (length($i) > fmt[i] ? "." : "-" ) fmt[i] "s", $i           
  print x
  }' config.txt temp.txt
Source: www.unix.com
bash "read -p"
#!/bin/bash
# Code for OSX 10.13.5. default UNICODE encoding.
echo""
echo "The default UTF-8..."
locale
echo""
echo "Change to 8 bit ASCII only..."
LANG="en_GB.US-ASCII"
export LANG="en_GB.US-ASCII"
locale
echo ""
for N in {0..255}
do
	printf '\x'$( printf "%02x" "$N" )
done
echo ""
Source: www.unix.com




Shell

Related
read input from stdin bash script Code Example read input from stdin bash script Code Example
find files changed in github actions Code Example find files changed in github actions Code Example
bash .inputrc color tab completion and more Code Example bash .inputrc color tab completion and more Code Example
remove detached disk from raid array linux Code Example remove detached disk from raid array linux Code Example
install tag gz Code Example install tag gz Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12