06-19-2008
Quote:
Originally Posted by
zaxxon
Have a look at the getopts command. There should be plenty examples on the net.
Thanks for the response.
Can you please demonstrate for the above requirement? A request!
Please make a not that "-" may appear anywhere in the string.
We need to find if it contains "-"
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX and Linux Applications
hi,
I have
* an IBM P550 machine,
* an AIX 5.3 running on it and
* an oracle database, already installed on it.
The problem (or question of my own) is:
Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies
2. UNIX for Advanced & Expert Users
hi,
I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses...
Here is the configuration of my system:
* an IBM P550 machine,
* an AIX 5.3 running on it and
* an oracle database, already installed on it.
The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies
3. Shell Programming and Scripting
input string="3MMTQSZ348GGMZRQWMJM4SD6M"
output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6M"
using linux shell script (4 Replies)
Discussion started by: pankajd
4 Replies
4. Shell Programming and Scripting
I am trying to write a if statement in KSH that if a string is start with abc then print something, I have written some code as below but it doesn't work.
Could someone please help me
if ]
then
print success
fi (5 Replies)
Discussion started by: yhever
5 Replies
5. Solaris
Hi all,
First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for.
I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
Discussion started by: newbie_01
0 Replies
6. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
7. Shell Programming and Scripting
Hi Experts.
I'm stuck with the below AWK code where i'm trying to move the records containing any special characters in the last field to a bad file.
awk -F, '{if ($NF ~ /^|^/) print >"goodfile";else print >"badfile"}' filename
sample data
1,abc,def,1234,A *
2,bed,dec,342,* A ... (6 Replies)
Discussion started by: shell_boy23
6 Replies
8. Shell Programming and Scripting
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies
9. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
10. Programming
Hello !
I'm creating a CGI which allow to display graph from some data.
The datas looks like :
2020-01-13-00-00,384.00,350.00
2020-01-13-06-00,384.00,350.00
2020-01-13-12-00,384.00,350.00
2020-01-13-18-00,384.00,350.00
2020-01-14-00-00,384.00,350.00... (1 Reply)
Discussion started by: Tim2424
1 Replies
LEARN ABOUT DEBIAN
radcrypt
RADCRYPT(8) System Manager's Manual RADCRYPT(8)
NAME
radcrypt - generate password hash for use with radius, or validates a password hash
SYNOPSIS
radcrypt [-d|--des] [-m|--md5] [-c|--check] plaintext_password [hashed_password]
DESCRIPTION
radcrypt generates a hashed digest of a plaintext password, or can validate if a password hash matches a plaintext password. DES and MD5
hashes are currently supported. When generating a password hash a random salt is generated and applied.
A hashed password can be validated by specifying -c or --check and passing hashed_password after plaintext_password on the command line.
In this case hashed_password will be checked to see if it matches plaintext_password. If so "Password OK" will be printed and the exit sta-
tus will be 1, otherwise "Password BAD" will be printed and exit status will be 0 (Note this is the opposite of a normal successful shell
status).
OPTIONS
-d --des
Use a DES (Data Encryption Standard) hash (default). Ignored if performing a password check.
-m --md5
Use a MD5 (Message Digest 5) hash. Ignored if performing a password check.
-c --check
Perform a validation check on a password hash to verify if it matches the plantext password.
EXAMPLES
$ radcrypt foobar
HaX0xn7Qy650Q
$ radcrypt -c foobar HaX0xn7Qy650Q
Password OK
SEE ALSO
radiusd(8), crypt(3)
AUTHORS
Miquel van Smoorenburg <miquels@cistron-office.nl>
RADCRYPT(8)