Hi Folks,
I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help..
thanks in adv.
Br///
Vijay. (1 Reply)
Hi,
I have a 5 gig file, no record terminators, field terminators are newline. The record length is 768 and I would like to check that every 768th byte is a newline and print out the byte position if it isn't. I would like to do this going either forward or backwards with one command if... (3 Replies)
the script on excution should take a directory path from useran a numric input and it should check indicate whether its write or not?
if the cmmd sh<script-name>,dir/path.<500>" is greater than 500 in size should be copied to dir ,temp in pwd and display the mesage'files of 2000 bytes hav been... (4 Replies)
1. The problem statement, all variables and given/known data:
The script usage will be as follows:
library.third source_directory
- Your script will display an appropriate error message and exit with status 3 if no parameters are given
- Your script will display an appropriate error... (2 Replies)
Hi All,
I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement:
assume my file has content:
hello= gsdgsd sfdsg sgdsg sgdgdg
world= gggg hhhh iiiii
xxxx= pppp ppppp pppp
my... (5 Replies)
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
I need a script that should print 'yes' if the argument is a valid shell variable name else 'No' if it is not a valid shell variable. A valid one begins with an alphabet or percentage (%) character and is followed by zero or more alphanumberic or percentage (%) characters.
For example:
$... (6 Replies)
How can I validate if time (HH:MM:SS) argument is valid? I got this from web but I can't modify it to exit the script if the time argument is invalid.
echo $1 | awk -F ':' '{ print ($1 <= 23 && $2 <= 59 && $3 <= 59) ? "good" : "bad" }'
ex:
./script.ksh 12:34:21 = okay
./script.ksh... (10 Replies)
Hello,
I am trying to develop a script to check for valid hostnames. Below are the prerequisites for a valid hostname which I got from wiki :
Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label... (8 Replies)
Discussion started by: rahul2662
8 Replies
LEARN ABOUT DEBIAN
ns_crypt
ns_crypt(3aolserver) AOLserver Built-In Commands ns_crypt(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_crypt - commands
SYNOPSIS
ns_crypt key salt
_________________________________________________________________DESCRIPTION
ns_crypt encrypted the key, also known as the password, using the salt and returns the result. It uses the same algorithm as the unix
crypt command.
The result from ns_crypt is a 13-character string. The first two characters correspond to the salt, and the remaining eleven characters
correspond to the password encrypted with the specified salt.
The password is a string (typically that of a password to be used for nscp and/or nsperm authentication).
salt should be two characters, typically from the set [a-zA-Z0-9./]. If the empty string is specified as the salt then ns_crypt returns
the empty string. If a string longer than two characters is specified for the salt it is truncated to two characters. If a one character
salt is provided the output will appear to have a two-character salt (the single character repeated), however, the encrypted value does not
correspond to the same password being encrypted with the equivalent two character salt. (As a result sticking with a two character salt is
highly recommended.)
Input to ns_crypt is case-sensitive.
EXAMPLES
nscp> ns_crypt aolserver ns
ns0WvClsyIL4A
nscp> ns_crypt aolserver NS
NSDQ1dPM.409Q
nscp> ns_crypt aolserver tcl
tcAbgtlzbEhVc
nscp> ns_crypt aolserver tc
tcAbgtlzbEhVc
nscp> ns_crypt aolserver ..
..7TNvXHLxJ9Y
nscp> ns_crypt aolserver .
..fwmBaZuzrRs
SEE ALSO nsd(1), info(n), nscp, nsperm, crypt(3)KEYWORDS AOLserver 4.0 ns_crypt(3aolserver)