Automating Logform Command in a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automating Logform Command in a script
# 1  
Old 07-03-2006
Automating Logform Command in a script

Hi all

I am trying to create a script to automate the creating of filesystems.
The problem I am having is as follows:-
After creating the Log Logical Volume, I want to format it, using the logform command.
The Logform command expects user intervention, by typing 'y' and 'enter' to continue.
How do I automate the 'y' and 'enter' part from within a korne shell script????

Any advice would be greatly appreciated!

Thanks
# 2  
Old 07-03-2006
I don't know the logform dialog, but research "here documents".
This is an example of an ftp dialog. ftp requires user input after it starts.
Code:
ftp somenode <<EOF
 USER username passwd
 cd /path
 get somefile
 bye
EOF

<<EOF (The eof part is your choice, use characters that are not part of any command and are not interpreted to mean anything by the shell )
# 3  
Old 07-03-2006
Thanks Jim!

Works great, much appreciated!

Regards
TheDoc
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Automating Linux Script

1. The problem statement, all variables and given/known data: I want to automate the creation or processing of the following: Directory and subdirectory creation for your scenario company Files in each of the directories Symbolic links from 2 subdirectories to their parent directories... (16 Replies)
Discussion started by: ekglag2
16 Replies

2. Shell Programming and Scripting

Automating Linux Script

I want to automate the creation or processing of the following: Directory and subdirectory creation for your scenario company Files in each of the directories Symbolic links from 2 subdirectories to their parent directories Setting appropriate file permissions for the directories and... (1 Reply)
Discussion started by: ekglag2
1 Replies

3. Shell Programming and Scripting

Automating Crontab through script??

is it possible to automate crontab through script... I ll be getting the data i.e. cron entries from DB. (5 Replies)
Discussion started by: nikhil jain
5 Replies

4. Programming

awk script for automating the other commercial software command lines

Dear All I need awk script to automated the other software command lines. I am having input files like "shape_eon_input_1.oeb.gz" to "shape_eon_input_968.oeb.gz" total of 968 files. For each files i have to run command line " eon -dbase shape_eon_input_1.oeb.gz -besthits 47000 -prefix... (20 Replies)
Discussion started by: bala06
20 Replies

5. Shell Programming and Scripting

automating a perl script

Hi, I have a perl script that takes in 2 numerical values as ARGV. perl script.pl parameter1 num1 num2 in my case I have 1000's of num1 and num2. I can have them in separate files. Please let me know how to automate this run using shell scripting or using awk, so that I don't have to... (4 Replies)
Discussion started by: Lucky Ali
4 Replies

6. Shell Programming and Scripting

Issues with automating SFTP command

Hi All, I am currently looking at automating the steps that I follow to download log files from putty to desktop. I connect to a client's machine through citrix desktop. I am required to download quite a number of application logs to identfiy the issues in production. Steps that is being... (3 Replies)
Discussion started by: krackjack84
3 Replies

7. Shell Programming and Scripting

Automating 'newgrp' command - how?

Hi, I have to add the 'newgrp' command to my login (.cshrc) script. The problem is that if I add it, it comes to infinite look, since newgrp opens new shell again and again. How to automate the newgrp when I have to login, and avoid that loop? Currently I'm thinking of a condition that... (2 Replies)
Discussion started by: moshmosh
2 Replies

8. Shell Programming and Scripting

Automating Interactive script

I have a script that will install software on all remote host. At the end of the script it starts the install.sh part and goes into a interactive mode asking Yes or No questions and prompting to add a username and password. My question is how can I script this so that these questions are... (7 Replies)
Discussion started by: soupbone38
7 Replies

9. UNIX for Dummies Questions & Answers

cron ? automating a script

Hi all. basically i need to run a script every 30 minutes. my script is simply an error report: errpt thats it, is there anyway to make this happen every 30 minutes without having to type errpt in, the script will get bigger as i add more things to do but just need to know how to... (8 Replies)
Discussion started by: hassanj
8 Replies

10. Shell Programming and Scripting

automating sftp script

I have to write an automated sftp script which uses password authentication method to access the remote server. I want to pass the password as a parameter or to be included in the script itself, so that when i run the sftp script, it should not prompt me to enter the password. Thanks in advance... (1 Reply)
Discussion started by: Rajeshsu
1 Replies
Login or Register to Ask a Question