Korn Shell script needed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Korn Shell script needed
# 1  
Old 09-11-2008
Korn Shell script needed

Hi all,

I need a Korn Shell script that will go out to all Unix Servers and pull all non humans IDs from them while at the same time produce a file to show which servers we have access to and which ones we don't.

Thanks in advance.
# 2  
Old 09-11-2008
show us what you have so far... i think nobody is going to write a whole script for you!
# 3  
Old 09-11-2008
Hi DukeNuke2,

***********************************************************
USAGE="usage UserId.ksh"
#this script will check unix box for a particular user id
a=`finger|grep -i "ahusain"`
echo "$a\n"
***********************************************************

Thanks
# 4  
Old 09-11-2008
Hi,

#USAGE="usage : UserId.ksh"
#this script will check unix box for a particular user id
`ps -ef>a.txt`
`finger>b.txt`
`cut -f 1 -d " " a.txt>a1.txt`
`cut -f 1 -d " " b.txt>b1.txt`
`cat b1.txt | sort | uniq > b11.txt`
`cat a1.txt | sort | uniq >a11.txt`
`diff a11.txt b11.txt | grep "<" | sed -e 's/<//' > c1.txt`


Thanks
# 5  
Old 09-15-2008
Hi all..

I didn't get any reply for this post..
Please anyone help me on this..

Thanks in advance
# 6  
Old 09-15-2008
Please read the rules of the forum Smilie

Please do not bump up questions if they are not answered promptly.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Needed with File Checker Korn Shell Script

I am attempting to write a korn shell script that does the following, but I am getting errors. I'm new to korn shell scripting and am not sure what I am doing wrong. Please help with example scripts. Thanks. 1) check for day of the week 2) if day of the week is Monday then check for the... (4 Replies)
Discussion started by: ijmoore
4 Replies

2. Shell Programming and Scripting

Help needed in Korn Shell scripting

#! /bin/ksh while read line do if ] ; then echo "no data" continue; fi echo "performing operation on $line" done < prg.txt (3 Replies)
Discussion started by: Juhi Kashyap
3 Replies

3. Shell Programming and Scripting

pass null value to sql script from korn shell script

There are 4 parameters that I have to pass from korn shell to sql script. 1) I have to check if $1 , $2 , $3 and $4 are null values or not . How can I do that ? 2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
11 Replies

4. Homework & Coursework Questions

Korn Shell Script

1. The problem statement, all variables and given/known data: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. 2. Relevant commands, code,... (3 Replies)
Discussion started by: burm
3 Replies

5. Shell Programming and Scripting

Korn Shell Script

I have to solve some exercises in Korn Shell, but i'm having some problems. For example: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. I... (3 Replies)
Discussion started by: burm
3 Replies

6. Shell Programming and Scripting

Help needed in character replacement in Korn Shell

How do I replace a space " " character at a particular position in a line? e.g. I have a file below $ cat i2 111 002 A a 33 0011 B c 2222 003 C a I want all the 1st spaces to be replaced with forward slash "/" and the 3rd spaces to have 5 spaces to get the output below: 111/002... (8 Replies)
Discussion started by: stevefox
8 Replies

7. AIX

Help with Korn Shell script

I have this Korn shell script that runs via a cron entry. It runs in a loop "watching" a specific file system for files with a certain name. The file system that it is watching is an upload file system for an FTP server. When files that are the correct name come in, it takes the extension of the... (1 Reply)
Discussion started by: heprox
1 Replies

8. Shell Programming and Scripting

Korn Shell Help Needed

How do I change directories to a path given by input variable in Korn Shell? e.g. I tired with the Korn Shell below but it doesn't work. ---------------------------------- #!/bin/ksh echo "Enter folder name: \c" read folder cd $folder ---------------------------------- Any help will... (5 Replies)
Discussion started by: stevefox
5 Replies

9. UNIX Desktop Questions & Answers

korn shell script

hi all i am writing the korn shell script. i have a SQL script which gives me the folowing output DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400 DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400 DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
Discussion started by: pavan_test
3 Replies

10. UNIX for Dummies Questions & Answers

korn shell script

hello., i have 2 files.. 1 file is in this folder /home/test/ssk/DSA.WLG.20050713211544.20050710.20050713211544 (this part) other file is in this folder /home/kk/dev/DSA.WLG.20050711210100.20050710.20050711210100 ... (1 Reply)
Discussion started by: pavan_test
1 Replies
Login or Register to Ask a Question