Unix Assignment1
Unix Assignment1
(BCAC392)
(mkdir,cd,ls,cat,touch,rm,chmod,vi editor,wc,sort,grep,uniq,pipe)
Q1.Create this above Directory structure using only command, whereas File1, File2, File3, File4 are file.
(Create file1, file2, file3, file4 using a single command.)
file1 contain below text.
Hello! This is File1.
file2 contain below text
Hello! This is File2.
Q2.Create a file called file5 and store your name, age, sex, and address in it
Concatenate the text of file1 and file2 and store it to file5 without replacing the text of file5.
Q6.1.Create a file using vi editor file name ‘text.txt’ and write the below lines.
Hi
Hello
Hi Hello
Hello World
Hi
Hello Linux
2. Count the number of characters and store the result to another file.
3. Sort the file with remove duplicates lines and count the number of lines and store the result to
another file.
4. Sort the file and store the result to another files.
5. Count the number of lines which begin with ‘Hi’ (remove duplicate lines) and store the result to
another file.