Sponsored Content
Top Forums Shell Programming and Scripting need a script to redirect the command prompt data int a log file. Post 302463155 by rajkumar_g on Saturday 16th of October 2010 02:21:58 AM
Old 10-16-2010
Wrench need a script to redirect the command prompt data int a log file.

Hello forum memebers,



I have to write a script to copy command arguments into a log.please see the below issue and help me to complete it.
i have command "mkidcfg" it is custiomized.I will run the command with one arguments .
mkidcfg -I _config.db_ids it will open the below options.
Code:
1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit
Option: 2
Tag: a_app_cc
ID: mas
Password: mas123
1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit
Option: 0

So now i want redirect the entire the data into one log file.when i open the log file . cat log
the below should be display.
Code:
1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit
Option: Tag: a_app_cc - mas - mas123 .
1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit

please help to me to write a script to done the above issue.I am looking forward from you....Smilie

Thanks & Regards
rajkumar_g

Last edited by Scott; 10-16-2010 at 07:30 AM.. Reason: Code tags again...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to redirect the output of a grep command to a file inside a shell script

hi, i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (11 Replies)
Discussion started by: kripssmart
11 Replies

2. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

3. UNIX for Advanced & Expert Users

Retrieve data and redirect to a file

How to write a shell script to retrieve datas from database after that this database are redirect to a excell sheet and then i got a mail that gives details about the database with the column name and data.. I m using oracle 9i... Thanks, Anup Das (2 Replies)
Discussion started by: anupdas
2 Replies

4. Windows & DOS: Issues & Discussions

Redirect command prompt in C WinAPI

Anyone has a clue how to redirect the commands sent to cmd via a C WinAPI program? What I'm doing is a C WinAPI GUI program the FORM have a richtextbox that'll be read-only and some test options are offered like "all, ping, netstat, ipconfig, traceroute...) and when these tests are running I... (2 Replies)
Discussion started by: Jess83
2 Replies

5. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

6. Shell Programming and Scripting

Redirect output to a different text file depending source of data

I have a list of DNS servers I need to look up information on. Each of these servers has a master and a slave database. Essentially what I need to do is create two text files for each server. One with the Master view and one with the Slave view. There's 20 servers, in the end I should have 40 text... (4 Replies)
Discussion started by: spartan22
4 Replies

7. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

8. Shell Programming and Scripting

Script to prompt user to enter data

Hi All I have a script that moves files from one dir to another dir based on date, but I would like to change it in a way that whoever is going to run to enter the dates in which files will be removed. This is my script: #!/bin/sh touch -mt 201302250000 /tmp/ref3 touch -mt 201302282359... (14 Replies)
Discussion started by: fretagi
14 Replies

9. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
kproplog(1M)						  System Administration Commands					      kproplog(1M)

NAME
kproplog - display the contents of the Kerberos principal update log SYNOPSIS
/usr/sbin/kproplog [-h | -e num] DESCRIPTION
The kproplog displays the contents of the Kerberos principal update log to standard output. This command can be used to keep track of the incremental updates to the principal database, which is enabled by default. The /var/krb5/principal.ulog file contains the update log main- tained by the kadmind(1M) process on the master KDC server and the kpropd(1M) process on the slave KDC servers. When updates occur, they are logged to this file. Subsequently any KDC slave configured for incremental updates will request the current data from the master KDC and update their principal.ulog file with any updates returned. The kproplog command can only be run on a KDC server by someone with privileges comparable to the superuser. It will display update entries for that server only. If no options are specified, the summary of the update log is displayed. If invoked on the master, all of the update entries are also dis- played. When invoked on a slave KDC server, only a summary of the updates are displayed, which includes the serial number of the last update received and the associated time stamp of the last update. OPTIONS
The following options are supported: -h Display a summary of the update log. This information includes the database version number, state of the database, the number of updates in the log, the time stamp of the first and last update, and the version number of the first and last update entry. -e num Display the last num update entries in the log. This is useful when debugging synchronization between KDC servers. -v Display individual attributes per update. An example of the output generated for one entry: Update Entry Update serial # : 4 Update operation : Add Update principal : test@EXAMPLE.COM Update size : 424 Update committed : True Update time stamp : Fri Feb 20 23:37:42 2004 Attributes changed : 6 Principal Key data Password last changed Modifying principal Modification time TL data FILES
/var/krb5/principal.ulog The update log file for incremental propagation. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWkdcu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
kpasswd(1), gkadmin(1M), kadmin(1M), kadmind(1M), kdb5_util(1M), kprop(1M), kpropd(1M), kadm5.acl(4), kdc.conf(4), attributes(5), SEAM(5) SunOS 5.10 29 Mar 2004 kproplog(1M)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy