Need some help :)

splanis

New Member
Joined
Jan 23, 2019
Messages
1
Reaction score
0
Credits
0
Hello there. Due to personal reasons i could not attend to some courses and i have some projects to do and also learn what i ve missed. I have some projects to do some certain things in the terminal, i managed to learn some basic commands, like create file,edit,move,delete, etc but i need some help for some other tasks. Lets start:
a) I managed to figure out some answers, but i cant figure out these:
1) print only the lines of a .txt that the last datum (or more) is a number
2) print only the lines of a .txt that that contain "XXX", but not "YYY"
3) print only the lines of a .txt that that dont start with "A" or "B" and contain "XXX" and "YYY" (<-with that order)
4) print how many users that their name doesnt start with "xxx" are signed in
5) print every user's tasks(interaction's) running on the system
6) print how many tasks running with ther name ending "xx"
7) print which tasks running running from administrator
8) print how many files from the current directory(not subdirectories) have permissions "rw" from everyone and "x from noone
9) find directories of the system starting from "x"
10) find and print the files with informations with name starting "xxx" at the directory /dev
11) sort a .txt with descending order by username (example line: George 25 3 1980)
12) sort .c files of my current directory by size
13) sort my user's file with perimissions 644 by size
14) sort /dev files first by owner and second by group and save the output at a .txt
15) create a file cointaining informations about the logged in users with their name starts from "xxx", ordered by date and time of the log in.
16) change from a .txt every "xxx" to "yyy"
17) change permissions at the all the files of a directory "a" so only the owner can run and write , and everyone has read permission
18) change permissions of a directory "a" so can access only the owner and the users at the same group with the onwer, and other users can not acces (current permissions 755)
19) create a user with username "xxxxx", then change the owner of a x.txt to the new user and move this file at his working directory.

b) THIS IS MORE IMPORTANT :p
1) using vi, create a file with name "xxxx" so it has about 15 entries with form: name, last name, class, grade1, grade2, grade3, grade4, with class can take "xxxx", "yyyy", "zzzz" and grades between 0 and 100. Example: George Brown Abcd 100 99 98 97 )
then print with awk commands
i) which entries, the name starts from "A" or "B" (print last name and then the name )
ii) which entries, the last name starts from "A" to "D" (print name and then the last name)
iii) which entries have grade"x" and grade"x" >Y (print every info)
iv) which entries have class "xxx" (print every info)
v) name last name and then the grades average
vi) which entries have grade"x" <Y
vii) which entries the last name ending at "xx"
2) write a awk script for "xxxx" file and create a "yyyy" file containg: Student1, name, last name, grades average (example: Student1 George Brown 95)
also sort the lines by average
3) write a awk script for "xxxx" file and print the average for every 4 courses (example: 95 93 92 91)
4) create a simple text file with name "xxxx" so every line will contain different number of words. write a script with input file "xxxx" that prints the contain upside down
5) write an awk command that prints the sum of size of every file(only files) of the directory i m in
6) create a txt file "xxx" containing 15 lines with a name and 15 random yes or no (example: George y n y n n y n y y n y n n y n)
write an awp script that prints the name has the most y

Sorry for this long post and sorry for my english (i m not a native speaker).
Hope somebody helps on some or maybe every commands i need, maybe with some explaining so i know what i m doing :p:p
 
Last edited:


I don't think the answer is to get us to do your homework/assignment for you. You will not learn very much from that.

I think that the answer is for you to contact the teacher, explain that you missed some input and are having difficulty giving answers Ask if they can please give you copies of the notes for the course. Or ask someone else who did the course for a copy of their notes.

It is good practice on Forums to ask one question on one thread. You are asking people 20+ questions. For many people, the result will be tl;dr.
 
I think you have to learn regex!
Will be very helpful in your case!
 
hi to you dear
ask aaaaallllllll of them from google and i promise you can get theeesssssseeee answer sooner
GOOD LUCK.
 

Staff online


Top