04-06-2009
Yes, you CAN do the scripting as suggested above. However, if anything goes wrong, those simplistic scripts will fail unpleasantly.
Nowadays I really recommend using simple Perl scripts for this kind of task. It's not at all hard - see
Perl Net::FTP for an introduction.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am facing problem while accesing FTP related commands in nawk code in bourne shell programming.I can able to connect to remote machine, but i can't able to get files from that machine.
Please help me in this.If you send code along with the solution, then it will be usefull for me. (4 Replies)
Discussion started by: nrsekhar
4 Replies
2. Shell Programming and Scripting
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
3. Shell Programming and Scripting
I have a shell script where I am trying to ftp some files but I get the error message "EOF unclosed" every time the script reaches the ftp section. Here is how my script is written.
#more code up here
rm -f $object >> $LOG_FILE 2>&1
fi #end of if
done #end of for loop
... (5 Replies)
Discussion started by: matrix1067
5 Replies
4. Shell Programming and Scripting
When my script deals with large input files like 22Gb or 18 GB the basic commands like sort or join fails when run from inside the shell scripts. Can there be any specific reason for this?
For e.g.
sort -u -t "," -k1,1 a.csv > a.csv.uniq"
sort -u -t "," -k1,1 b.csv > b.csv.uniq"
The... (3 Replies)
Discussion started by: esha
3 Replies
5. Shell Programming and Scripting
Hello
In the shell script we have a FTP command like below
ftp -n -v -q winftp.principal.com >/infa/datafiles/GRP/Scripts/ftp_from_infa_dvcn.log<<END_SCRIPT
quote USER $FTP_USER
quote PASS $FTP_PASS
ascii
lcd $FTP_LOCALDIR
cd $FTP_FLDR
put $FTP_FILE
bye
exit
If i... (1 Reply)
Discussion started by: Pratik4891
1 Replies
6. Shell Programming and Scripting
I would like to execute a commands in four different servers through ssh at a single instance(simultaneously).
Below are the details with examples,
ssh user1@server1 "grep xxxx logs"
ssh user1@server2 "grep xxxx logs"
ssh user1@server3 "grep xxxx logs"
Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies
7. Shell Programming and Scripting
Hello
I'm trying to write simple script to delete archive logs for RMAN, unfortunately it's not working, I tried two way to do that:
#!/bin/ksh
echo "Start ....."
rman target=/ << EOF
RUN {
delete force noprompt archivelog until time 'sysdate-10';
}
EXIT;
EOF
echo "END ..."
echo... (6 Replies)
Discussion started by: samer.odeh
6 Replies
8. Shell Programming and Scripting
Hi
I have a program
int main(int srgc, char *argv)
{
for(int i=1; i<50; i++)
{
system("dd if=/dev/zero of=file$i bs=1024 count=$i");
}
return 0;
}
My doubt is how to use the "$i" value inside C code
Please help (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
9. Shell Programming and Scripting
Hi,
I have a bash script to run many system commands on CentOS machine, but I am puzzled by some commands had no effect on parent environment.
For example, I want to refresh the desktop xdg menu when some processes added or deleted items from desktop xdg menu. If I run "killall gnome-panel"... (4 Replies)
Discussion started by: hce
4 Replies
10. Open Source
Hi All,
I have a current Process that runs "windows script " for the file movement that needs to changed to a "DataStage Process (Using shell script )"
Source :Text file is getting generated as part of Datastage Jobs processes and resides in a shared drive (Unix server)
Target :ftp... (2 Replies)
Discussion started by: developer.dwh9
2 Replies
LEARN ABOUT DEBIAN
net::trac::connection
Net::Trac::Connection(3pm) User Contributed Perl Documentation Net::Trac::Connection(3pm)
NAME
Net::Trac::Connection - Connection to a remote Trac server
DESCRIPTION
This class represents a connection to a remote Trac instance. It is required by all other classes which need to talk to Trac.
SYNOPSIS
use Net::Trac::Connection;
my $trac = Net::Trac::Connection->new(
url => 'http://trac.example.com',
user => 'snoopy',
password => 'doghouse'
);
ACCESSORS
url
The url of the Trac instance used by this connection. Read-only after initialization.
user
password
ACCESSORS
/ MUTATORS
logged_in [BOOLEAN]
Gets/sets a boolean indicating whether or not the connection is logged in yet.
mech [MECH]
Gets/sets the Net::Trac::Mechanize (or subclassed) object for this connection to use. Unless you want to replace it with one of your own,
the default will suffice.
METHODS
new PARAMHASH
Creates a new Net::Trac::Connection given a paramhash with values for the keys "url", "user", and "password".
ensure_logged_in
Ensures this connection is logged in. Returns true on success, and undef on failure. Sets the "logged_in" flag.
PRIVATE METHODS
_fetch URL
Fetches the provided relative URL from the Trac server. Returns undef on an error (after "warn"ing) and the content
("$self-"mech->content>) on success.
_warn_on_error URL
Checks the last request for an error condition and warns about them if found. Returns with a TRUE value if errors occurred and a FALSE
value otherwise for nicer conditionals.
_tsv_to_struct PARAMHASH
Takes a paramhash of the keys "data" Given TSV data this method will return a reference to an array.
LICENSE
Copyright 2008-2009 Best Practical Solutions.
This package is licensed under the same terms as Perl 5.8.8.
perl v5.12.3 2009-06-10 Net::Trac::Connection(3pm)