07-07-2006
Quote:
Originally Posted by reldb
i am not even using the variable.. the same ${arr[2]} is working before ssh but not working in ssh statements.
Um, yes, that you are using the variable means that you are, in fact,
using the variable. That's what 'using' means. As macosta pointed out, variables don't carry across like that. if you don't declare and populate the array in the block for the ssh then it won't know what it is.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to run an awk split on a value that has been pushed through an array and I was wondering what the syntax should be??
e.g. running time strings through an array and trying to examine just minutes:
12:25:30
10:15:13
08:55:23
awk '
NR==FNR{
... (2 Replies)
Discussion started by: dcfargo
2 Replies
2. Shell Programming and Scripting
Hi All,
I have the following code sequence for reading some bulk file and moving the content to two different arrays.
while read data
do
THREEG_PATTERN=`echo $data | egrep "3G"`
if
then
NEW_THREEG_PATTERN=`echo $THREEG_PATTERN | cut -d " " -f2`
... (12 Replies)
Discussion started by: subin_bala
12 Replies
3. Shell Programming and Scripting
Hi all,
ssh uname@remote_server 'cat /tmp/remote_file_name > home_dir/a512386/new/local_file_name'
The above given command is working fine.
but if i try to move the file only if exists in the remote server i.e) giving the same within if condition it executes but the file is not stored in my... (1 Reply)
Discussion started by: Shri123
1 Replies
4. Shell Programming and Scripting
Hi,
Am not very well versed with unix, i wrote a script which will make a new file using cat option like this,
trans.sh
#!/bin/sh
cat > file1
echo how are you
I wrote only this part since i want to use this concept for something else. What i want to ask is, this script when executed... (4 Replies)
Discussion started by: romsf
4 Replies
5. Shell Programming and Scripting
Hello I have the file df.tmp
FS is actually the / FS but escape character\ and end of line $ is used in order to fetch exctly / and not other filesystems.
awk '/\/$/ {print $(NF-1)+0}' df.tmp will work properly and return a value eg. 60
but when I am trying to issue the command with the array... (3 Replies)
Discussion started by: drbiloukos
3 Replies
6. Shell Programming and Scripting
I have a file
root@server # cat /root/list12
11.22.33.44
22.33.44.55
33.44.55.66
33.44.55.66
33.44.55.66
I try to pass to array and display unique.
root@server# cat /root/test12.sh
#!/bin/bash
#delcare array badips and accumulate values to array elemenrs
badips=( $( cat... (4 Replies)
Discussion started by: anil510
4 Replies
7. Shell Programming and Scripting
There are 4 files inside one folder matching criteria i.e. File name = ABCJmdmfbsjopXXXXXXX_mm-dd-yyyy_XXX.data
Here is the Code which find the files matching criteria:-
TS=`date +"%m-%d-%Y"`| for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data"`
do # Matching File Processing Code.... (1 Reply)
Discussion started by: lancesunny
1 Replies
8. Shell Programming and Scripting
I tried to use variable inside an array variable, but its not working as expected.:wall:
ENV1=123
ENV1=789
ENV1=120
ENV2=567
if
then
name=ENV1
echo "${name}"
echo "${name}"
echo "${name}"
else
name=ENV1
echo "${name}"
fi
Output: ./val.sh 1
123 (2 Replies)
Discussion started by: Jayavinoth
2 Replies
9. UNIX for Dummies Questions & Answers
Hi guys
Let me at first describe the whole thing that I'm trying to do. Lets say I have 100 files like the following one.
Ow 1230 16.000000 -0.834000 16.083957
1.751652398 -17.20094528 -4.450623277
Hw 1231 ... (6 Replies)
Discussion started by: saleheen
6 Replies
10. Programming
const int VALUES = {7,4,2,1,0}; //or int VALUES = {7,4,2,1,0};this statement inside a class definition gives error. Why? (3 Replies)
Discussion started by: milhan
3 Replies
LEARN ABOUT DEBIAN
gnome-ssh-askpass
GNOME-SSH-ASKPASS(1) General Commands Manual GNOME-SSH-ASKPASS(1)
NAME
gnome-ssh-askpass - prompts a user for a passphrase using GNOME
SYNOPSIS
gnome-ssh-askpass
DESCRIPTION
gnome-ssh-askpass is a GNOME-based passphrase dialog for use with OpenSSH. It is intended to be called by the ssh-add(1) program and not
invoked directly. It allows ssh-add(1) to obtain a passphrase from a user, even if not connected to a terminal (assuming that an X display
is available). This happens automatically in the case where ssh-add is invoked from one's ~/.xsession or as one of the GNOME startup pro-
grams, for example.
In order to be called automatically by ssh-add, gnome-ssh-askpass should be installed as /usr/bin/ssh-askpass.
ENVIRONMENT VARIABLES
The following environment variables are recognized:
GNOME_SSH_ASKPASS_GRAB_SERVER
Causes gnome-ssh-askpass to grab the X server before asking for a passphrase.
GNOME_SSH_ASKPASS_GRAB_POINTER
Causes gnome-ssh-askpass to grab the mouse pointer using gdk_pointer_grab() before asking for a passphrase.
Regardless of whether either of these environment variables is set, gnome-ssh-askpass will grab the keyboard using gdk_keyboard_grab().
AUTHOR
This manual page was written by Colin Watson <cjwatson@debian.org> for the Debian system (but may be used by others). It was based on that
for x11-ssh-askpass by Philip Hands.
GNOME-SSH-ASKPASS(1)