There's NO k in your text to be replaced! I'm using m as the target char.
DON'T cat the file, and DON'T tr the file. Use as given:
That changes lower case m to red upper case L , provided you enter the explicit <ESC> char and NOT two chars ^ and [ .
I need to write a make script to install a C module in a UNIX
environment.It should install the sources, build the libraries and
install them and also install the info pages on the system.
Can this script be general enough to also install on
windows, windows dll, windows help file's etc. Any... (3 Replies)
Hi,
I try to write a script to create a new directory.
#!/bin/bash
echo "Please enter folder name (6 characters only) :"
read foldername
mkdir /home/user/$foldername
$foldername >> /home/list/list.txt
My question/situation:
1) how to ensure the folder name MUST BE 6 characters... (0 Replies)
Hi,
I have a very basic knowledge of Unix and I need your help for a small script that will do the following commands that I do manually by just giving the filename TPR20080414.txt
cut -d'|' -f3,4 TPR20080414.txt> oe_012.lkp
awk -F "|" '{temp=$1;$1=$2;$2=temp}1' OFS="|" oe_012.lkp >... (3 Replies)
Hi,
I have a script that ftp over the file:
CFGFILE=/export/home/myuser/scripts/ftp1.cfg
LOGFILE=/app/bea/logs/
LOCALPATH=/expport/home/myuser/ECNLogs/
YEAR=`date '+%Y'`
MONTH=`date '+%m'`
DAY=`date '+%d'`
HOUR=`date '+%H'`
MINUTE=`date '+%M'`
LASTHOUR=$((HOUR-1))
echo $LASTHOUR
... (4 Replies)
Hi All,
I have a script which throws the output if condition matches. I run the cmd :
# ldf
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 1984564 1375019 550009 72% /
/dev/dsk/c1t0d0s3 5040814 2628410 2361996 53% /usr... (4 Replies)
Good morning. I am searching for "how-to"'s for some particular questions:
1. How to write a script in HP-UX 11.
2. How to schedule a script.
3. How to "call" scripts from the original script.
4. How to su to another user from within a script.
This is the basics of what the... (15 Replies)
if i have a script called test.sh
file1=$(ls -l|awk '{print $9 $1}')
awk ' /date_of_selling:/ { print $6 ":" &9 }' /$file1 >> data.txt
if i wanna this script to run automatically every day at 8 am :D (3 Replies)
How do we create a shell script that creates a makefile?
what if we want to use the #include header files too? (2 Replies)
Discussion started by: sslokhan
2 Replies
LEARN ABOUT SUNOS
crypt
crypt(3C) Standard C Library Functions crypt(3C)NAME
crypt - string encoding function
SYNOPSIS
#include <crypt.h>
char *crypt(const char *key, const char *salt);
Standard conforming
#include <unistd.h>
char *crypt(const char *key, const char *salt);
DESCRIPTION
The crypt() function encodes strings suitable for secure storage as passwords. It generates the password hash given the key and salt.
The key argument is the plain text password to be encrypted.
If the first character of salt is "$", crypt() uses crypt.conf(4) to determine which shared module to load for the encryption algorithm.
The algorithm name crypt() uses to search in crypt.conf is the string between the first and second "$", or between the first "$" and first
"," if a "," comes before the second "$".
If the first character of salt is not "$", the algorithm described on crypt_unix(5) is used.
RETURN VALUES
Upon successful completion, crypt() returns a pointer to the encoded string. Otherwise it returns a null pointer and sets errno to indicate
the error.
The return value points to static data that is overwritten by each call.
ERRORS
The crypt() function will fail if:
EINVAL An entry in crypt.conf is invalid.
ELIBACC The required shared library was not found.
ENOMEM There is insufficient memory to generate the hash.
ENOSYS The functionality is not supported on this system.
USAGE
The values returned by this function might not be portable among standard-conforming systems. See standards(5).
Applications should not use crypt() to store or verify user passwords but should use the functions described on pam(3PAM) instead.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO passwd(1), crypt_genhash_impl(3C), crypt_gensalt(3C), crypt_gensalt_impl(3C), getpassphrase(3C), pam(3PAM), passwd(4), policy.conf(4),
attributes(5), crypt_unix(5), standards(5)SunOS 5.10 28 Sep 2004 crypt(3C)