Sponsored Content
Top Forums UNIX for Dummies Questions & Answers script unix which accept two arguments Post 302580478 by gennyy on Thursday 8th of December 2011 03:39:56 PM
Old 12-08-2011
script unix which accept two arguments

does anyone can help me with this homework, please..I am beginner in linux and I don't how to do it Smilie

Create a script scanner.sh which will accept two arguments: the first argument is the DNS name or the IP address of a system, or a network address or an IP range, the second argument is optional and can be a port number or a port range (if is missing the entire port range will be used).
The application will have an integrated help (-h or --help option) and will verify the validity of the arguments warning the user if an argument is incorrect. The script will try to establish tcp connections (using telnet) to check if the ports are open, and will list on the screen for each scanned system the opened ports.
Specialized applications are not allowed to be called inside the script (applications like nmap).
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Writing Unix script to accept arguments

Hi, This may be answered elsewhere but I wasn't entirely sure of the wording I should use to search so here we go with an attempt: I wish to make a script that will allow commands to be passed to it such as: <command> -oOPTIONS -aANOTHER -pRINT etc However I don't really know the... (3 Replies)
Discussion started by: stuaz
3 Replies

2. Shell Programming and Scripting

ksh script that will accept arguments

Hi, I am not very skilled using ksh scripts. How do I create a ksh script that will accept arguments and use them in the script ? I need to make this: Run this command with this argument: ./mykshprogram.ksh madsen and sometimes I need to do this: Run the ksh again with 2... (3 Replies)
Discussion started by: hasselhaven
3 Replies

3. Shell Programming and Scripting

How to accept arguments in shell script when calling in perl

I have a shell script like this: #!/bin/sh $PYTHON MetarDecoder.py < ../data/mtrs/arg1/arg2 And I'm calling it with this in perl: my $output = `./metar_parse.sh --options`; It's successful when I put in actual values for arg1 and arg2 in the shell script, but I'd like to pass arguments... (1 Reply)
Discussion started by: civilsurfer
1 Replies

4. Shell Programming and Scripting

passing arguments to unix command or script inside tclsh

hi everobody kindly consider the following in tclsh I understand that we can do the following %exec UnixCmd arg1 arg2 but if I assinged the arguments to a list insde tclsh how can I use them back i.e %set ArgList %exec UnixCmd %exec Unixcmd $list %exec all the... (1 Reply)
Discussion started by: Blue_shadow
1 Replies

5. Programming

Make a file accept only two arguments from the command line

DELETED (2 Replies)
Discussion started by: ProgMan2015
2 Replies

6. Homework & Coursework Questions

Make a file accept only two arguments from the command line

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: 1) The script is executed in the Korn shell. 2) Name the shell script file is asg6s. 3) The asg6s file is... (7 Replies)
Discussion started by: ProgMan2015
7 Replies

7. UNIX for Dummies Questions & Answers

UNIX script can accept 1 to n parameters

Just for my leaning purpose, I appreciate if someone answer my question: A UNIX script can accept 1 to n parameters. For each of these parameters, write out the parameter id number and its value. (1 Reply)
Discussion started by: shumail
1 Replies

8. Shell Programming and Scripting

Accept data from file or stdin in script

I have a script that looks like this:sed -f myfile.sed $1 > $1.out called myscript and would like to change it so the parameter isn't necessary: ls *.idx | myscript | xargs some_command What do I need to add so it can run either way? TIA ---------- Post updated at 09:41 AM ----------... (1 Reply)
Discussion started by: wbport
1 Replies
sc_auth(8)						    BSD System Manager's Manual 						sc_auth(8)

NAME
sc_auth -- smart card authorization setup script SYNOPSIS
sc_auth accept [-v] [-u user] [-d domain] [-k keyname] sc_auth accept [-v] [-u user] [-d domain] -h hash sc_auth remove [-v] [-u user] [-d domain] sc_auth hash [-k keyname] sc_auth list [-v] [-u user] [-d domain] DESCRIPTION
sc_auth configures a local user account to permit authentication using a supported smart card. Authentication is via asymmetric key (also known as public-key) encryption. sc_auth works with signing keys, but not encryption keys. sc_auth can perform the following actions: accept Associate a user with a public key on a card. The key to use can be specified either by its name or its hash. remove Remove all public keys associated with a user. hash Print the hashes for all keys on all inserted cards. list List all public keys associated with a user. OPTIONS
-u user Specifies the user whose account is to be modified -d domain Specifies the directory domain containing the user account -k keyname Specifies a public key by its name -h hash Specifies a public key by its hash -v Verbose mode NOTES
sc_auth is a shell script. It is intended to be modified by administrators to suit their local environments. sc_auth is only known to work with a local directory. Consult the script's source for some limited guidance to using remote directories. BUGS
sc_auth hash might display the hashes of encryption keys as well as signing keys, even though sc_auth accept does not work with encryption keys. MacOSX December 11, 2006 MacOSX
All times are GMT -4. The time now is 10:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy