UNIX SHELL taking in 2 words


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting UNIX SHELL taking in 2 words
# 1  
Old 10-03-2010
UNIX SHELL taking in 2 words

echo apple orange

What command would I use to grab the common letters out of both words?

output would be

a and e are both common in these 2 words!

Please no ruby explanations and please no full answers I just need to know how to get started!

Could I sed out a and if the variable =aa then I could have a new variable which would be my output = a is common
Is there a way to take whatever was seded out and set it equal to a variable?

Last edited by shellmybell; 10-03-2010 at 03:33 PM..
# 2  
Old 10-03-2010
... and no forum rule violations.....

Homework / classwork should be posted in the homework forum. Do you know where that forum is?
# 3  
Old 10-03-2010
Quote:
Originally Posted by Neo
... and no forum rule violations.....

Homework / classwork should be posted in the homework forum. Do you know where that forum is?
Google?
# 4  
Old 10-03-2010
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem in taking input Shell script

I was writing a shell script, where i need to run a command through script and then take input from user and later terminate it. i am not sure how to take input in a proper format immediately after a command. example: below command line is used to import some data in to database (LDAP)... (3 Replies)
Discussion started by: Mridul17
3 Replies

2. Shell Programming and Scripting

Taking information from a postgres sql query and putting it into a shell script array

I have a postgres sql statement that is the following: select age from students; which gives me the entries: Age --- 10 15 13 12 9 14 10 which is about 7 rows of data. Now what I would like to do with this is use a shell script to create an array age. As a results... (3 Replies)
Discussion started by: JSNY
3 Replies

3. Shell Programming and Scripting

Taking mirror copy of the application id and password into the new UNIX machine

I am working in Datastage Migration project. The applications has to be moved from legacy machines to the new machines. all the applications will be having their own application id and password (non expiry) created in the unix (5.3). Now the scripts and the datastage applications has to be moved... (1 Reply)
Discussion started by: kmanivan82
1 Replies

4. Shell Programming and Scripting

shell prog for double words

I need a shell programing script for "double words" Available Data: This is a shell script that is used to find the ten character words in the machine local dictionary (/usr/dict/words) that are made up with two valid english words that are five character long. This means that each of the... (0 Replies)
Discussion started by: sujithcrazy
0 Replies

5. Shell Programming and Scripting

Logging in unix account taking password from a parameter file

Hi All, I am writing a script where it updates a file in an unix account. To update that file i need to be logged in as that account user. say account name is ab01 and its password is passab01. What i want to do is, my script should read login id and password from a parameter file and... (4 Replies)
Discussion started by: pkbond
4 Replies

6. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

7. Solaris

Information about taking dump of a unix server on a tape and then restoring

Hi all, Can anyone provide me with a site or book that gives detailed information about taking dump of a unix server on a tape and then restoring the server from the dump Also i want information about migration from old server to new server (solaris 5.6 to solaris 8) (3 Replies)
Discussion started by: asalman.qazi
3 Replies

8. Shell Programming and Scripting

Remove the first two words from shell arguments

Hi I need to delete first two words from the arguments my script receives .. no matter how many arguments are passed . Thanks Praveen (5 Replies)
Discussion started by: praveenbvarrier
5 Replies

9. Shell Programming and Scripting

Shell script is taking more than 3 hrs to execute

Hi I am doing a process of converting all the values of key column into a row, for eg Key col1 col2 1 1 1 1 2 1 1 1 3 1 3 1 2 ... (2 Replies)
Discussion started by: nvuradi
2 Replies

10. UNIX for Dummies Questions & Answers

Taking Screenshots in Unix

Hello, I am trying to take screenshots of various windows and dialog boxes in Unix. I am primarily a Windows user and am wondering if Unix has the capability of taking screenshots similar to using "Print Screen" and "Alt+Print Screen" in Windows? If not, then could anyone please suggest a method... (3 Replies)
Discussion started by: Skybum105
3 Replies
Login or Register to Ask a Question