SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 3 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 21 Dec 2017 My Price 10.00

File Processing Commands Worksheet Phoenix Material

I need help for my Unix week 3 assignment. I would like to get this completed as soon as possible.

University of Phoenix Material

 

File Processing Commands Worksheet – 10 Marks – Week 3

 

1. I am now in $HOME/sales/east directory. I want to have my login shell display me today’s date whenever I login every time by telnet.

For this, what steps I have to do? (1/2)

 A. $ vi .profile

Type one line : echo "Today’s date is `date`"

$ chmod +x .profile

$ . .profile

 

B. $ cd ../..

$ vi .profile

Type one line : echo "Today’s date is `date`"

$ export .profile

$ .profile

 

C. $ cd $HOME

$ vi .profile

Type one line : echo "Today’s date is `date`"

$ . .profile

 

D. $ vi ~/.profile

Type one line : echo "Today’s date is "date"

$ . .profile

Ans:

 

2A. Why I am getting this error when I assign like this ? (1/2)

$ FIRST-NAME=smith

ksh: FIRST-NAME=smith: not found.

Ans:

2B. Under ksh or bash shell environments, what is the problem here ? (1/2)

$ export PATH=/usr/bin /usr/local/bin /usr/ucb/bin

Ans:

 

3. Executing cp temp/temp1 temp1.txt it will result in...         (1/2)


A.   Error since the same filename is used
B.   Error since an extension is used for the second temp1
C.  It will move the contents of temp1 from directory temp to temp1 of current  directory and when finished it will erase the contents of temp1 of temp directory

D. It will copy temp1 from directory temp to temp1.txt of current directory

Ans :

 

4. What kind of files will be matched by the following when you list by ls command: (3)

For Ex :

$ ls [a-z][0-9]

Ans : This matches any file with 2 characters, first being a lower case letter and the second being a number from 0 to 9


A. ls [0-9][a-z][0-9][A-Z]                               -- Note : there are no spaces anywhere.


Ans:

B. ls [A-Z0-9_][A-Za-z_0-9]                          -- Note : there are no spaces anywhere.


Ans:

C. ls [0-9]Z[0-9]


Ans:

 

5. What is the command to list files in a directory: (2)

A.     Having only three alphabets:


Ans:
B.     Starting with a digit and ending with a digit


Ans:

 

6. There are many C programs in my directory which have an extension of .c (ex : first.c, second.c etc).
How can I concatenate all C files into one file called "myC_files (1)

Ans :

 

7. How do you sort first 15 lines in a file called 'datafile" ? (1) (You need to use a pipe)
Ans:

 

8. How do you add a line to the end of an existing file "myfile" with date stamp. (1)

Ans :

Attachments:

Answers

(5)
Status NEW Posted 21 Dec 2017 01:12 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)