Computing.Net > Forums > Unix > korn shell problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, 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.




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

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




Response Number 2
Name: uct
Date: October 13, 2003 at 21:26:49 Pacific
+1
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:)



Response Number 3
Name: Nails
Date: October 13, 2003 at 22:07:29 Pacific
+1
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



Response Number 4
Name: WilliamRobertson
Date: October 13, 2003 at 23:27:27 Pacific
+1
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.



Response Number 5
Name: uct
Date: October 14, 2003 at 13:08:50 Pacific
+1
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)?



Related Posts

See More



Reply to Message Icon

Korn shell function expor... How to set environment va...



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


Google Ads



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