08-20-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.. Does anybody knows how can I split a file in N documents?? I have a document of more than 80,000 lines (it is generated in a dynamic way, sometimes has 80,000 others 30,000 , or 1000,000) Im trying tyo break this file in only 1 lines of commands but I want to break it in a N differents files... (2 Replies)
Discussion started by: gtapia
2 Replies
2. Shell Programming and Scripting
Hello,
I want to know the use of the here document with the << operator.
Tried to go through some books but the concept was not clear.
Please can any1 expalin me this with a simple example.
Thanks,
Rahul. (6 Replies)
Discussion started by: rahulrathod
6 Replies
3. Shell Programming and Scripting
I tried doing
ftp myhost <<HERE
username
password
quit
HERE
but it doesnt work. Why?
When I do ftp host, I always get prompted for username, and once I type that in I get prompted for password. But when I try doing it from here document it freezes. (2 Replies)
Discussion started by: JamesByars
2 Replies
4. Shell Programming and Scripting
Plz can somebody give me the shell and perl scripting documents,i need to start the scrpts learning.now i know about the linux commands,but need help in putting the same in the scripting with do,if,while and also using diffrent commands in the scrpipts,pls help.. (3 Replies)
Discussion started by: satish.res
3 Replies
5. Shell Programming and Scripting
Here is my problem: can we set the variables in the HERE DOCUMENT? I have tried but failed. Any one has good comments please let me know.
#!/bin/csh -f
pbrun -u xmgbrk runshell <<!
@ $num1 = `wc -l /home/tpltp/csh/scripts/who.csh`
echo "$num1"
if ( $num1 > 0 ) then
echo $num1 | tee -a... (1 Reply)
Discussion started by: tpltp
1 Replies
6. Shell Programming and Scripting
Can we use a here document inside a here document?
Something like this
ssh user@remotehost << REMOTE
sudo vserver vsernamename enter << VSERVER
perform actions on vserver.
VSERVER
REMOTE (6 Replies)
Discussion started by: mnanavati
6 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
<HTML><HEAD><TITLE>Personal Web Page</TITLE></HEAD>
<BODY BGCOLOR="WHITE"><H3>
<CENTER>My Personal Page<HR>... (0 Replies)
Discussion started by: Larry_1
0 Replies
8. Programming
I'm trying to use Here documents to pass several commands to a remote server over SSH. However I'm having problems. The code is as follows:
nohup ssh $i_hostname exec /usr/bin/ksh -s << EOF >> $AS_STOPSAP_LOG &
echo $i_instname;
ps -ef | grep name | grep ${i_instname} |grep -v grep
... (4 Replies)
Discussion started by: doonan_79
4 Replies
9. Programming
I'm trying to write a foreground (password prompt) ssh command, passing in a here doc - any idea where I'm going wrong?
ssh <user>@<targetserver> /usr/seos/bin/sesu - <targuser> -c /usr/bin/ksh "param1" << EOF
date
echo ${1}
EOF
Tells me "Invalid option param1". However a simple date... (8 Replies)
Discussion started by: doonan_79
8 Replies
10. Shell Programming and Scripting
I try to ssh uses bash script in here-document like this.
ssh root@$SERVER <<EOF
if ; then
service httpd start
fi
exit
EOF
But got an error below.
maybe the if command causes the problem. Thanks for help. (2 Replies)
Discussion started by: muffle
2 Replies
LEARN ABOUT DEBIAN
ssh-argv0
SSH-ARGV0(1) BSD General Commands Manual SSH-ARGV0(1)
NAME
ssh-argv0 -- replaces the old ssh command-name as hostname handling
SYNOPSIS
hostname | user@hostname [-l login_name] [command]
hostname | user@hostname [-afgknqstvxACNTX1246] [-b bind_address] [-c cipher_spec] [-e escape_char] [-i identity_file] [-l login_name]
[-m mac_spec] [-o option] [-p port] [-F configfile] [-L port:host:hostport] [-R port:host:hostport] [-D port] [command]
DESCRIPTION
ssh-argv0 replaces the old ssh command-name as hostname handling. If you link to this script with a hostname then executing the link is
equivalent to having executed ssh with that hostname as an argument. All other arguments are passed to ssh and will be processed normally.
OPTIONS
See ssh(1).
FILES
See ssh(1).
AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0. Jonathan Amery wrote this ssh-argv0 script and the associated documentation.
SEE ALSO
ssh(1)
Debian Project September 7, 2001 Debian Project