Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

shell script no spam plz In this stage, we remove punctuation characters from a

ID: 3823214 • Letter: S

Question

shell script no spam plz

In this stage, we remove punctuation characters from a file or text. You must write a shell-script named stripchars that can be called in either of two ways: strip chars filename, which reads the file named filename: or strip chars, which reads from standard-input. We define punctuation as any of the characters OI]{ or For example, if the input was: Twaddle you say? I'll have you know there's a deepy truth in what I said Then the output from stripchars would be the lines

Explanation / Answer

#!/bin/sh
function()
{
#echo "$@" | tr -d '[:punct:]'
echo "$@" | tr -d '[:punct:]'
}

function "$@"


save as my_script.sh and run as ./my_scripts '"Twankle !!" { kkkj} you?,( hehe) okay. ; '

output will be :

Twankle    kkkj you hehe okay