I'm writing a bash script to edit a youtube video name and I wrote a sed function for it:
function longSed(){
ins0=$1
ins1=$( $ins0 | sed 's/and//g;s/ or//g;s/the//g;s/And//g;s/yet//g;s/the//g;s/so//g;s/ a//g;s/ A//g' )
return $ins1
}
v2=longSed v1
echo "$v1 --> $v2"
But I keep receiving a command not found
error on the second-to-last line no matter what I do. What am I missing here?
EDIT : This is the entire script:
#!/bin/bash
v0=$(youtube-dl --skip-download --get-title --no-warnings $1 | sed 2d )
v1=$(youtube-dl --skip-download --get-title --no-warnings $1 | sed 2d | tr -dc '[:alnum:]\n\r ' | head -c 64 )
function longSed(){
ins0=$1
ins1=$( $ins0 | sed 's/and//g;s/ or//g;s/the//g;s/And//g;s/yet//g;s/the//g;s/so//g;s/ a//g;s/ A//g' )
return $ins1
}
v2=$(longSed v1)
echo "$v0 --> $v2"
I probably shouldn't be using sed
for an entire wordlist like that, but I don't want a separate wordlist file.