Sponsored Content
Top Forums Shell Programming and Scripting Shell scripting errors for ftp process Post 302904250 by Sarmistha on Tuesday 3rd of June 2014 05:34:05 AM
Old 06-03-2014
Shell scripting errors for ftp process

Hi i am facing problem in shell scripting for ftp process getting following errors
here is the script & result
Code:
vi GtpTxnlogs_ftp.sh
"GtpTxnlogs_ftp.sh" 40 lines, 921 characters
#!/usr/bin/bash
######################################################################################
# Copyright (coffee) 2012-2013 by Roamware Inc.
#
# Script name: GtpTxnlogs_ftp.sh
#
# Description: This script FTPes the gtptxn files to RQM App server IP
#
# Date: 05-Aug-2013
#
######################################################################################
#
#. /opt/Roamware/scripts/setup.sh
#DIRECTORY DETAILS
LOG_DIR=/opt/Roamware/logs/cron/
logfile=GtpTxnlogs_ftp.log
> $LOG_DIR/$logfile
SUMM_OFFLINE=/opt/Roamware/logs/rqm/traces/summary/offline/
DET_OFFLINE=/opt/Roamware/logs/rqm/traces/detail/offline/
echo "start" >> $LOG_DIR/logs/$logfile
FTPUSER="roamware"
cd $SUMM_OFFLINE
scp /opt/Roamware/a_tmp/dkprobe* $FTPUSER@ IP/opt/Roamware/a_tmp/
put GtpTxnlogs_ftp.log
quit
END_SCRIPT
echo "FTP Completed to RQM App server..."
 
~
~
~
"GtpTxnlogs_ftp.sh" 40 lines, 922 characters
[04:05:27:roamware@JF-Probe]>GtpTxnlogs_ftp.sh
./GtpTxnlogs_ftp.sh: line 26: /opt/Roamware/logs/cron//logs/GtpTxnlogs_ftp.log: No such file or directory
dkprobe.20130604-234 100% |*****************************************************
./GtpTxnlogs_ftp.sh: line 33: put: command not found
./GtpTxnlogs_ftp.sh: line 35: quit: command not found
./GtpTxnlogs_ftp.sh: line 36: END_SCRIPT: command not found
FTP Completed to RQM App server...



Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks

Last edited by Sarmistha; 06-03-2014 at 09:08 AM.. Reason: Due to wrong title
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

questions on ftp shell scripting

did a search but was not allowed to use 'ftp' because its too short of a word. for some reason, i can't seem to remember anything about ftp shell scripts - would someone please refresh my memory on the syntax and maybe give a short example? thanks for the time. (5 Replies)
Discussion started by: psyjoniz
5 Replies

2. Shell Programming and Scripting

scripting a ftp process

I am trying to automate a process in one of two ways: 1) ftp .txt files from a unix server to a Windows 2000 server. I want to do this in a script. Can I supply the login and password to the Windows server inside the script? 2) I tried this and failed: sftp .txt files from the unix server to... (2 Replies)
Discussion started by: gbernard
2 Replies

3. Shell Programming and Scripting

Background Process Shell Scripting

I have a following program: echofunc() { filename=$1 echo "reading $filename" while read line do echo $line; sleep 6; done < $filename } split -5 new.dat ls x* > input.dat while read file do echofun $file & done < input.dat (3 Replies)
Discussion started by: dhieraj
3 Replies

4. Shell Programming and Scripting

Shell scripting - FTP

Can some one help with script to track ftp logins on AIX server.. (1 Reply)
Discussion started by: ddk2oo5
1 Replies

5. UNIX for Dummies Questions & Answers

Wait Process in Shell Scripting.

Hello, I have a script that needs to wait till the previous process is done within the same script.But my script doesnt wait till that it is done.Can anyone suggest how I can stop my process till the previous task is done. I tried 'wait' but I dont have a static process id so is there... (2 Replies)
Discussion started by: sud
2 Replies

6. Shell Programming and Scripting

FTP-Shell scripting

Hi Everybody, I have come across a problem while doing FTP using shell scripting. So I request any of you can give some idea of how to go about solving the problem but i request you not to give the solution please. Because i'm a java developer newly into Unix shell progrmming and am very enthu... (1 Reply)
Discussion started by: RSC1985
1 Replies

7. Shell Programming and Scripting

Shell Scripting not showing in process when it goes to sleep

Hi All, Here is my script: sleep_time=`echo "9.6 * $num_servers"|bc| cut -d. -f1` if ; then sleep_time=3600;fi ### Allow the compare script to kick in after 1 hour at the least logger "Sleeping for $sleep_time seconds ...Will call compare.sh thereon" $act_log sleep $sleep_time #sleep... (3 Replies)
Discussion started by: ntgobinath
3 Replies

8. Shell Programming and Scripting

How to stop the process in shell scripting?

Hi all, I have tried the below code to execute. #! /bin/bash date1=`date -d "today 08:00:00" +%s` date2=`date -d "today 08:01:00" +%s` path=/home/user01/red/IDC/sample cd $path java Cspsamp 111.19.5.172 7025 rd1 rd1 "5022=Query|5026=109378|4=627|5=E:VD|5042=$date1|5049=$date2"... (5 Replies)
Discussion started by: aish11
5 Replies

9. Shell Programming and Scripting

Scripting with FTP Process

Hi Guys, Good day ULF! I have a general "auto-ftp" code which looks something like this: #!/bin/sh cd $1 ftp -v -n $2 << EOF user $3 $4 prompt cd $5 bin mput $6 quit EOF This works pretty well, but I'm thinking of how can I make a code by maybe including on this code, for... (5 Replies)
Discussion started by: rymnd_12345
5 Replies

10. Shell Programming and Scripting

FTP a file using Shell Scripting (Help needed)

the requirements is to have a linux script which connects to a windows machine using ftp command and check for a flag file if found copy a .csv file into current machine. (3 Replies)
Discussion started by: tradingspecial
3 Replies
MooseX::App::Cmd(3pm)					User Contributed Perl Documentation				     MooseX::App::Cmd(3pm)

NAME
MooseX::App::Cmd - Mashes up MooseX::Getopt and App::Cmd. SYNOPSIS
See "SYNOPSIS" in App::Cmd. package YourApp::Cmd; use Moose; extends qw(MooseX::App::Cmd); package YourApp::Cmd::Command::blort; use Moose; extends qw(MooseX::App::Cmd::Command); has blortex => ( traits => [qw(Getopt)], isa => "Bool", is => "rw", cmd_aliases => "X", documentation => "use the blortext algorithm", ); has recheck => ( traits => [qw(Getopt)], isa => "Bool", is => "rw", cmd_aliases => "r", documentation => "recheck all results", ); sub execute { my ( $self, $opt, $args ) = @_; # you may ignore $opt, it's in the attributes anyway my $result = $self->blortex ? blortex() : blort(); recheck($result) if $self->recheck; print $result; } DESCRIPTION
This module marries App::Cmd with MooseX::Getopt. Use it like App::Cmd advises (especially see App::Cmd::Tutorial), swapping App::Cmd::Command for MooseX::App::Cmd::Command. Then you can write your moose commands as moose classes, with MooseX::Getopt defining the options for you instead of "opt_spec" returning a Getopt::Long::Descriptive spec. AUTHOR
Yuval Kogman <nothingmuch@woobling.org> With contributions from: Guillermo Roditi <groditi@cpan.org> COPYRIGHT
Copyright (c) 2007-2008 Infinity Interactive, Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-02-29 MooseX::App::Cmd(3pm)
All times are GMT -4. The time now is 01:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy