Computing.Net > Forums > Unix > korn shell problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

korn shell problem

Reply to Message Icon

Name: uct
Date: October 13, 2003 at 09:22:43 Pacific
OS: win xp
CPU/Ram: 560mhz,128mb
Comment:

Here I got some UNIX problem..Hope you can help..
1)Write a UNIX command to concatenate the contents of all files in your present directory and to put them
into a new file named 'all.txt'

2)Which command is used to remove a link of a file?

3)(i) Write a single command line to search for the files with the name "mymemo" from the current directory
onwards and to print the current pathname of all files found.

List down the keystroke for
1) search for the specified pattern in the forward direction.If the end of the file is reached, the search wraps
around.

2) search for the specified pattern in the backward direction.If the top of the file is reached, the search wraps
around.



Sponsored Link
Ads by Google

Response Number 1
Name: Jerry Lemieux
Date: October 13, 2003 at 20:03:35 Pacific
Reply:

I'd recommend you try and do some of your homework yourself.



0

Response Number 2
Name: uct
Date: October 13, 2003 at 21:26:49 Pacific
Reply:

I already go through and try out most of
the question....but the question above
I flip through whole of my book...but still
cannot find out the command the suit for it
...Hope somebody can provide me some idea...
I really eager want to know the answer....
really thanks:)


0

Response Number 3
Name: Nails
Date: October 13, 2003 at 22:07:29 Pacific
Reply:

OK:

I'll do the first one. This command places all the files with a txt extension, places it in a file, and the 'xargs cat' does the content thing. Change as you see fit.

ls *.txt > file
xargs cat < file > all.txt

Oh, and a hint for 3) man find

Regards,

Nails


0

Response Number 4
Name: WilliamRobertson
Date: October 13, 2003 at 23:27:27 Pacific
Reply:

I was going to suggest
cat *.* > all.txt
though the more different approaches you try out the better.

The last two sound like vi questions.


0

Response Number 5
Name: uct
Date: October 14, 2003 at 13:08:50 Pacific
Reply:

I go to flip through another book
online....I think this book is really
explaining good in concept and well written and I find the answer...Am I correct?

2)rm
3)(i) find . -print

1)/
2)?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: korn shell problem

korn shell script problem (using awk ? ) www.computing.net/answers/unix/korn-shell-script-problem-using-awk-/3547.html

Korn Shell script www.computing.net/answers/unix/korn-shell-script/3691.html

shell problem www.computing.net/answers/unix/shell-problem/5406.html