grep –c “ABC” file1
I want to create a directory such that anyone in the group can create a file and access any person’s file in it but none should be able to delete a file other than the one created by himself.
We can create the directory giving read and execute access to everyone in the group and setting its sticky bit “t” on as follows: mkdir direc1 chmod g+wx direc1 chmod +t direc1
Eg: if cat file1 ABCD EFGH Then O/p should be EFGH ABCD sed ‘1! G; h;$!d’ file1 Here G command appends to the pattern space, h command copies pattern buffer to hold buffer and d command deletes the current pattern space.