Thanks for your reply, very much appreciated. Totally agree with what you suggested RE: delivering password security.
Just to clarify though, does that mean it is not possible to do the reverse of
?
I am a bit curious of a way to a generate a 'magic'/garbled string of some sort. For example, how do I work out what string echo | dc would give me 'Hello World'? It does not have to be echo | dc, perhaps there is another UNIX command that is easier to use that can achieve the same thing.
I know it is trivial. I guess that is why I say UNIX fun I want to create a simple tagline of some sort to use for my scripts so I can more easily identify which ones I've written and not tampered with.
Last edited by Scrutinizer; 03-19-2015 at 06:56 AM..
Reason: CODE tags
Hi,
My script prints a few varibales as each it reads each line of a text file and then prints them on screen, however iam having problem in aligning and sorting them.
what happens is this
Last First Number
Mark leo 87798798... (1 Reply)
With so many different flavors of UNIX and Linux available in the world, choosing the best one for yourself, your family, or for your organization can be such an overwhelming and rather difficult decision to make! :eek:
If you were a salesman and you had to decide the best UNIX/Linux distro for... (1 Reply)
As a mind refresher, I was thinking to start a new thread for ONE LINERS....funny/weird or any technical one liners....
Let me start first......
=================================
#!/bin/ssh
#The Unix Guru's View of Sex
unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ;... (3 Replies)
Hello, I'm only taking Intro to UNIX in school right now, so please bear with me. My problem is with a sort-of recycle-bin rig I've created for fun. I'm using Ubuntu 9.04, I am the admin. (only user, actually) of this computer. I'm using this script in ~/.bashrc
# if files exist, remove contents... (6 Replies)
Hi all,
I've search the forums regarding posts similar to this already but can't find the suitable response. Am actually looking for something very trivial I think. I just want to mask/obfuscate the a.out file and run it like a normal UNIX program. I've look at gpg and encryption but it requires... (4 Replies)
I am trying to use echo in CSH and getting an error.
I want to use to tell the user which parameters are optional.
set msg2 = " -Inmod= -Nxz= -Varp="
echo $msg2 (3 Replies)
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Hi,
I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql
To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
Hi guys, man bash doesn't help much here nor does the WWW.
(I have discovered there is technically no limit to a bash array.)
I am thinking of adding a new full manual inside AudioScope.sh.
A few questions here.
The main question is, assuming I go ahead with this idea:-
Is there a limit... (6 Replies)
I have users that print files to selected printers. Instead of creating one function for each printer I would like to have just one and passing the files to print as well as the wanted printer. The following code does not work, of course.
I'm expecting that $1 is the list of files to be printed... (6 Replies)
Discussion started by: emare
6 Replies
LEARN ABOUT PHP
str_pad
STR_PAD(3) 1 STR_PAD(3)str_pad - Pad a string to a certain length with another stringSYNOPSIS
string str_pad (string $input, int $pad_length, [string $pad_string = " "], [int $pad_type = STR_PAD_RIGHT])
DESCRIPTION
This functions returns the $input string padded on the left, the right, or both sides to the specified padding length. If the optional
argument $pad_string is not supplied, the $input is padded with spaces, otherwise it is padded with characters from $pad_string up to the
limit.
PARAMETERS
o $input
- The input string.
o $pad_length
- If the value of $pad_length is negative, less than, or equal to the length of the input string, no padding takes place.
o $pad_string
-
Note
The $pad_string may be truncated if the required number of padding characters can't be evenly divided by the $pad_string's
length.
o $pad_type
- Optional argument $pad_type can be STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH. If $pad_type is not specified it is assumed to
be STR_PAD_RIGHT.
RETURN VALUES
Returns the padded string.
EXAMPLES
Example #1
str_pad(3) example
<?php
$input = "Alien";
echo str_pad($input, 10); // produces "Alien "
echo str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien"
echo str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___"
echo str_pad($input, 6 , "___"); // produces "Alien_"
?>
PHP Documentation Group STR_PAD(3)