Use and complete the template provided. If you don't, your post may be deleted!
The problem statement, all variables and given/known data:
I have to make as home work several commands with gerp find and sed
Relevant commands, code, scripts, algorithms:
FIND command
-use command find to display all files, such that file is usual file and display all his line with inscription "MA"
GREP comand
display user with grep command form /etc/passwd
to display all login to begin and finishing with letter a or b
Code:
etc.users
admina
bserb
broota
beginning and finishing with the same sign
Code:
etc. users
aghata:....
roootr:....
to contain what the least three identical signs standing by me
Code:
etc. users
rooot:.....
admmmin:.....
ussser...
it including five signs which was can read backwards
Code:
etc. users
Do geese see God? -> do Geese see goD
Devil lived -> devil liveD
SED comand
replace multiple the pronouncement of any sign one such sign
Code:
etc. jfaghkjfhadglkjaaaadfgdffffffdddttttmmmm
jfaghkjfhadglkjadfgdfdttm
replace every the pronouncement of sign aaaa bbb only and or only b
The attempts at a solution (include all code and scripts):
In find i try find . -type f -exec grep -l MA {} \;
Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Nicolaus Copernicus University
Torun, Poland
professor Zyglarski Bazej
sk1-cw2
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
it including five signs which was can read backwards
Some ideas for detecting a palindrome based on your example.
var1="Do geese see God"
var2="do Geese see goD"
echo "var1=${var1}"
echo "var2=${var2}"
echo ""
# Use the "tr" command to change upper case to lower case and remove spaces
var1_lower=`echo "${var1}"|tr 'A-Z' 'a-z'|tr -d ' '`
var2_lower=`echo "${var2}"|tr 'A-Z' 'a-z'|tr -d ' '`
echo "var1_lower=${var1_lower}"
echo "var2_lower=${var2_lower}"
echo ""
# Use the "rev" command to reverse the string
var2_lower_rev=`echo "${var2_lower}"|rev`
echo "var2_lower_rev=${var2_lower_rev}"
echo ""
if [ "${var1_lower}" = "${var2_lower_rev}" ]
then
echo "This is a Palindrome"
else
echo "This is not a Palindrome"
fi
var1=Do geese see God
var2=do Geese see goD
var1_lower=dogeeseseegod
var2_lower=dogeeseseegod
var2_lower_rev=dogeeseseegod
This is a Palindrome
@methyl: Probably from Polish - by the O/P. A language translation would also have translated other parts of the post (the homework template headings, etc.), which are clearly not translated.