Sponsored Content
Top Forums Shell Programming and Scripting Need quick help with basic FIND in korn shell Post 11242 by Kelam_Magnus on Friday 30th of November 2001 03:38:36 PM
Old 11-30-2001
This site does have a policy about posting homework. They usually frown on it.

So, if you post in the future, try to make it a "real world" question.

Thanks Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find -name "*.txt" in Korn Shell Script

The following find command works on the Korn Shell command line: find . \( ! -name . -prune \) -type f -name "*.txt" -mtime +100 In the particular directory I'm in, the above find will list correctly the three text files that exist that haven't been modified in over 100 days: ... (3 Replies)
Discussion started by: jwperry
3 Replies

2. Shell Programming and Scripting

KORN Shell - Spawn new shell with commands

I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server.. I have seen some code that may help - but I cant get it working as below: spawn /usr/bin/ksh send "telnet x <port_no>\r" expect "Enter command: " send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies

3. Shell Programming and Scripting

how to convert from korn shell to normal shell with this code?

well i have this code here..and it works fine in kornshell.. #!/bin/ksh home=c:/..../ input=$1 sed '1,3d' $input > $1.out line="" cat $1.out | while read a do line="$line $a" done echo $line > $1 rm $1.out however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies

4. UNIX for Dummies Questions & Answers

find and FTP multiple files in Korn Shell

I want to FTP multiple files in a directory that the files were created since midnight of the same day using korn shell. I can use the "find" command using -newer arguement that compares against a time stamp file. The script identifies the files, I can't use a variable = `find . ` as the... (2 Replies)
Discussion started by: lambjam
2 Replies

5. Shell Programming and Scripting

need a quick basic shell script help

im trying to run the below if command ifconfig -a |grep 10.100.120.21 gives me below output inet addr:10.100.120.21 Bcast:10.100.120.255 Mask:255.255.255.0 i just want a basic shell which says if above exists then continue how would i do this? (6 Replies)
Discussion started by: eb222
6 Replies

6. Shell Programming and Scripting

quick script C shell

Cool. I played with scripts at home over the weekend. Come to find out not working on other shells. I have linux/bash at home, but now I'm trying on Solaris csh. How would I write the following script for Solaris C shell? ---------- #!/bin/bash NBR=231 for ((i = 0; i < $NBR; i++ )) do... (1 Reply)
Discussion started by: ajp7701
1 Replies

7. Shell Programming and Scripting

Korn Shell Script to find out error in logfile

Hi All, I am new to this forum as well as to unix scripting. Can you please help me to create a korn shell script to find out errors in logfiles and get the name of that logfile ( which is having error) in email and email it to me? (2 Replies)
Discussion started by: jithu
2 Replies

8. Shell Programming and Scripting

Find command in Korn Shell

Hi, I am trying to execute the below in Ksh (telnet) find ./request.txt -mmin -30 It says find: bad option -mmin What i am trying to do is by using find command i am checking wheather the file request.txt is there for 30 minutes or not Please help (1 Reply)
Discussion started by: chinniforu2003
1 Replies

9. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

10. Shell Programming and Scripting

Quick Help in shell script

Need to subtract date stored in variable from the current date, answer should come in days..and months. Suppose two variable having value like A=”Wed Jan 15 08:59:08 GMT 2014” B= `date` #Sun May 23 09:29:40 GMT 2010 SubtractAB= $A-$B #..? AddAB=$A+$B #... ? C=$B+9 # Sun May 23... (3 Replies)
Discussion started by: KuldeepSinghTCS
3 Replies
snntpd,v0.3.8(8)					      System Manager's Manual						  snntpd,v0.3.8(8)

NAME
snntpd - small news server SYNOPSIS
snntpd [-t timeout] [-P] [-S] [logger...] DESCRIPTION
snntpd is a small news server. It needs to be run under inetd or tcpserver, as root or as the owner of /var/spool/sn. snntpd does not fork into the background. It expects to read and write from and to the network on descriptors 0 and 1. ARGUMENTS
logger... (usually /usr/bin/logger) is taken to be a logging program, and all log output is piped to it. If logger... is not specified, log messages are directed to descriptor 2. OPTIONS
-t timeout specifies how long snntpd should wait for input before it gives up and exits. timeout is in seconds and defaults to 600. -P snntpd includes it's pid in log output. -S Suppress NNTP greeting on startup. This is useful if you want to perform authentication before running snntpd, or want to provide your own greeting, from a wrapper. POSTING AND POSTING PERMISSIONS
Posts are usually handled externally by the /usr/sbin/SNPOST script, which is responsible for fine-grain posting control; handling of con- trol messages; and the ultimate distribution of the posted article. snntpd permits or denies posting in a very simple manner: If /var/spool/sn/.nopost exists, posting is not allowed. Otherwise, if the environment variable POSTING_OK is not set, posting is not allowed. Otherwise if POSTING_OK is set (to the empty string), posting is generally allowed, and all POSTed articles are piped to the SNPOST script, which has the final say in the matter. The value of $POSTING_OK is not currently used, but is reserved. FILES
/var/spool/sn/.fifo If this file exists, and is a fifo, snntpd will write the name of a newsgroup into it as that newsgroup becomes the current one. If the fifo does not exist snntpd will not create it. /var/spool/sn/.noservice If this file exists, snntpd will display its first line and exit. If the file can't be read or is empty, a default message is dis- played. This is useful for temporarily disabling the news server while you perform any maintenance. /var/spool/sn/.nopost See POSTING PERMISSIONS above. /var/spool/sn/.SNPOST If this script or program exists, it is invoked instead of SNPOST to accept a posted article. /var/spool/sn/news.group.name/.nopost These files really belong to SNPOST, and it is unfortunate that snntpd has to check for their existence to determine the posting flag for the LIST command. See /usr/sbin/SNPOST. /var/spool/sn/news.group.name/.info If this file exists, its first line is taken as the description of that group for use with the LIST NEWSGROUPS command. /var/spool/sn/news.group.name/.times is a binary file containing entry times, to support the NEWNEWS command. /var/spool/sn/news.group.name/.created is an empty file retained for it's timestamp, to support the NEWGROUPS command. SIGNALS
If snntpd catches SIGHUP, the files /var/spool/sn/{.fifo,.noservice,.nopost} (see below) are checked again, as they are during startup. Other signals have default behaviour. ENVIRONMENT VARIABLES
See also /usr/sbin/SNPOST for a list of environment variables exported by snntpd. PATH The PATH must be set such that snntpd can find SNPOST in order to accept postings. If PATH does not include /usr/sbin, /usr/sbin will be appended to it. POSTING_OK This variable helps determine the site-wide posting policy. See POSTING PERMISSIONS above. TCPREMOTEIP If this value is set, it is taken to be the dotted-quad IP address of the connecting client. If it is not set, snntpd attempts to derive it for itself, and then set its value. TCPLOCALIP as above, but for the server's dotted-quad IP. SNROOT If this is set and is not empty, the value is used everywhere in place of /var/spool/sn, the default news spool directory. SEE ALSO
snsend(8), /usr/sbin/SNPOST N.B. Harold Tay snntpd,v0.3.8(8)
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy