#! /bin/ash
#read string from file

filecon=$(cat /root/surces/tmp/scrtxt)  

#get string follow ";DES:" 

filename=${filecon#*;DES:}
if [ ${#filecon} == ${#filename} ] #string lenth
 then
        echo "no match"
        exit 1
fi
cutpos=$(expr index "$filename" ';')   #get position
let cutpos=cutpos-1
filename=${filename:0:$cutpos}  #cut strings
echo "filename :  "$filename

echo $(expr index "$filename" ' ')
filename=${filename/ /-}   #replace first found
filename=${filename// /_}     #replace all
filename=$filename

filename=$(echo $filename | tr '[A-Z]' '[a-z]')   #replace

echo $filename
export WWW="ename"

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2022-01-07
猜你喜欢
  • 2021-07-01
  • 2021-06-30
  • 2021-07-05
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
相关资源
相似解决方案