Shell script pointers


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Shell script pointers
# 1  
Old 04-27-2001
shell script pointers

Hi folks, I have two systems running Unix and two systems running "that other" operating system. At the moment I am concentrating on learning as much as i can about unix. On of the things I have been doing that i find helpful is booting system 1 (solaris 8(intel)) then booting system 2 (mandrake 8.0) Then, from Linux, telnet into my solaris machine, cd to a directory 'logs/' then opening vi, and writing a small log file outlining what i hope to do this session and where i got last session. Don't ask me why, but it seems to help me stay focused and on track as i am doing all of this on my own and working construction full time so i cant attend classes or anything. But enough of that, what i want is a script to run on my linux box, as soon as i log in that will telnet into solaris and cd to the log/ directory, then open Vi with the filename in the date format (ie 04.27.2001),naturally, i would have to input usr/pass.

I use bash on both machines if that helps.

What i am not looking for is for someone to write it for me, but to give me some help as i go.

for example, everyone tells me not to use telnet because of poor security, to use SSh instead, can i use this with solaris? is there a better way? I am wondering if i can mount the log/ directory as a network mounted filesystem shared by both machines?

anyway, your thoughts are appreciated.

L Hutz


[Edited by lionel_hutz on 04-27-2001 at 05:52 PM]
# 2  
Old 04-27-2001
Telnet is fine across a local area network. You can install SSH for Solaris, check out http://www.sunfreeware.com To fire off a connection when you log in, there are a couple ways. The first would bypass the password, you form a trust between the hosts with a .rhosts file in your home dir or by modifying the /etc/hosts.equiv file This bypasses the password prompt. Be careful and do some reading on this if they are exposed directly to the Internet. Either way you will need to add some code to the end of your .bashrc file in your home, probably by execing an xterm with the appropriate telnet or rsh (if you set up the trust). I would have to play with it to make it work, but that is the principal. Please post what you do to make this work.
Good luck
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Pointers and array

Hello, I read from a book exercise for a challenge. How to print out each letter of char array a by two different pointers pa and ppa in the example? I have tried my code for letter "r" by testing without full understanding as only the first one worked. #include<stdio.h> int main() { char... (17 Replies)
Discussion started by: yifangt
17 Replies

2. Programming

Problem With Pointers

Hi guys. What is the difference between these: 1. int *a; 2. int (*a); (2 Replies)
Discussion started by: majid.merkava
2 Replies

3. Shell Programming and Scripting

Pointers on writing a unix script

Hi All, I am writing a unix shell script. I have a file called Results.txt which stores 4 fields separated by pipe. i.e. a pipe delimited file. I want to loop through each record of this file and store each of these 4 fields into variables. I have read can be done through awk but I have never... (7 Replies)
Discussion started by: shwetainnani
7 Replies

4. Programming

Need help with the Pointers in C

I have a special character called ô. When it is declared as a character variable its showing it can be printed. But when it is declared as a character pointer variable its showing it cannot be printed. I am just wondering why its happening like this.. c1 = '@'; c2 = 'ô'; char *fp; fp="XXô"; if... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies

5. UNIX for Advanced & Expert Users

shared pointers

I am new to shared pointer conceot in C++ and hence require some clarification: For example: class A { public: virtual ~A() { } int x; }; typedef boost::shared_ptr<A>... (1 Reply)
Discussion started by: uunniixx
1 Replies

6. Programming

restricted pointers

Hi all. I am trying to use restricted pointers to allow the gcc compiler optimize the code, but I have not been able to make it work so far. I am testing with this code: #include <stdlib.h> #include <stdio.h> #include <time.h> #include <sys/time.h> void vecmult(int n, int * restrict a, int... (0 Replies)
Discussion started by: carl.alv
0 Replies

7. Programming

pointers

Hi I mash with pointers in C. I solve this problem about 5 hours and I don't know how I should continue. void InsertFirst (tList *L, int val) { tElemPtr new; if((new = malloc(sizeof(tElemPtr))) == NULL) Error(); new->data = val; new->ptr = L->frst; L->frst = new;... (2 Replies)
Discussion started by: Milla
2 Replies

8. Programming

pointers

is this a valid c declaration int (*ptr(int *b)); plz explain... (4 Replies)
Discussion started by: areef4u
4 Replies

9. Shell Programming and Scripting

functiom pointers

Hi all i wonder about function pointers as i never used them in my C code . could any tell me why and where exactly function pointers come into picture . thanq (1 Reply)
Discussion started by: Raom
1 Replies

10. Programming

Pointers and array

hi all, let say i have a pointer exit, and this exit will store some value. how can i store the value that the pointer points to into an array and then print them out from the array. thanks in advance (2 Replies)
Discussion started by: dianazheng
2 Replies
Login or Register to Ask a Question