buddy, you have to understand this thing, root has all power.
For super user, the permission bits will not be cross checked, so not only echo, cat, other editors and anything can edit the files if you are working as super user.
I am trying to write a bash script that takes a file as an argument and appends my name if this file ends in .txt... I am not sure how to do this though. Any help is greatly appreciated! (4 Replies)
I was searching for an option where i can echo some strings together with the contents of a file.
Eg. I was to echo the below string to a file
"alter application PMS_ add variable CurrYear Y2009;" >> ${ESS_MAXL_DIR}/PMS_SUB.txt
The value 2009 is coming from a file called date.txt without the... (3 Replies)
Sorry about the title, but this should be fairly self-explanatory.
My script seems to work, except that in the output, below, the first three lines are correct, but why does it print the additional lines 4, 5, & 6?
Script:
#!/bin/bash
while read;
do
client="$(grep -m 1 Client | awk... (3 Replies)
I'm trying to write a script that will do an ls of a location, echo it into a file, and then read that file and selectively delete files/folders, so it would go something like this:
cd $CLEAN_LOCN
ls >>$TMP_FILE
while read LINE
do
if LINE = $DONTDELETE
skip
elseif LINE =... (2 Replies)
Hi,
i want to create an user-friendly script where you are asked for two numbers. i would like that these two number to be separated with "--" for example, but i can't figure out how to do this.
for example
read -p "Insert lowest and highest value: " min ; echo -n "-- "; read max
so... (3 Replies)
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Hello,
I have a very basic script
#!/usr/bin/ksh
while
print ' '
print ' 1. View Command History '
print ' 2. List files in current Directory '
read opt'?Enter Option> ' ;do
if ;then
fc -l
fi
#
if ;then
ls -la
I want to... (10 Replies)
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Hello.
I want to to backup some "default:" values from a file do some other job and after restore that "default:" values back.
The problem is that the source and destination file has a lot of default: strings in it but with different values...
So..
Here is an example:
A part of my source... (6 Replies)
I have a bash script that is running a mysql query and creating a csv file with a time stamp. It then uploads that to a ftp server. Everything works great when I manually run it. But then I have a cron job set to run every monday, wednesday and friday at 5am est. When the cron job runs, it... (7 Replies)
Discussion started by: akallenberger
7 Replies
LEARN ABOUT PHP
ssh2_methods_negotiated
SSH2_METHODS_NEGOTIATED(3) 1 SSH2_METHODS_NEGOTIATED(3)ssh2_methods_negotiated - Return list of negotiated methodsSYNOPSIS
array ssh2_methods_negotiated (resource $session)
DESCRIPTION
Returns list of negotiated methods.
PARAMETERS
o $session
- An SSH connection link identifier, obtained from a call to ssh2_connect(3).
RETURN VALUES EXAMPLES
Example #1
Determining what methods were negotiated
<?php
$connection = ssh2_connect('shell.example.com', 22);
$methods = ssh2_methods_negotiated($connection);
echo "Encryption keys were negotiated using: {$methods['kex']}
";
echo "Server identified using an {$methods['hostkey']} with ";
echo "fingerprint: " . ssh2_fingerprint($connection) . "
";
echo "Client to Server packets will use methods:
";
echo " Crypt: {$methods['client_to_server']['crypt']}
";
echo " Comp: {$methods['client_to_server']['comp']}
";
echo " MAC: {$methods['client_to_server']['mac']}
";
echo "Server to Client packets will use methods:
";
echo " Crypt: {$methods['server_to_client']['crypt']}
";
echo " Comp: {$methods['server_to_client']['comp']}
";
echo " MAC: {$methods['server_to_client']['mac']}
";
?>
SEE ALSO ssh2_connect(3).
PHP Documentation Group SSH2_METHODS_NEGOTIATED(3)