08-19-2005
thanks for both of ur reply.
i solve the problem by cd to the working directory in my schedule job.
the reason why i never consider to use full path is because it will restrict my program flexibility or rather i need to change the path each time i need to use it in other place as well.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have created a file generic.func and it has lots of functions. One of the functions is this:
Check_backup_size()
{
dsmc q b $BACKUP_DIR/"*.Z" | awk '{print $1}'|sed 's///g' > outputfile
X=`awk '{sum += $1} END {print sum }' outputfile'`
echo "$X"
ls -ltr $BACKUP_DIR/"*.Z" | awk... (5 Replies)
Discussion started by: ashika
5 Replies
2. UNIX for Dummies Questions & Answers
This may sounds dumb, but can I call on a function from a file? For example, I have a function file full of functions like below (no shell designation):
func { echo "blah blah blah 1" }
func2 { echo "blah blah blah 2" }
func3 { echo "blah blah blah 3" }
Am I able to call on any one... (3 Replies)
Discussion started by: douknownam
3 Replies
3. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
4. Shell Programming and Scripting
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies
5. Shell Programming and Scripting
Hi,
I have a shell script 'sample.sh' which has some functions as below.
#fun1
fun1()
{
date
}
#fun2()
{
echo hi
}
I want to run these functions as background processes and also redirect the output to a file. My function calling statements are in a different file 'sample.cfg' as... (3 Replies)
Discussion started by: rama_kodam
3 Replies
6. Shell Programming and Scripting
Hi I need to call a function written in a cpp file with arguments inside the shell script..Can anyone help me how to do this:( (1 Reply)
Discussion started by: rkrish
1 Replies
7. Shell Programming and Scripting
Hi,
I need to run start_load function for two tables.
Step 1: if HMAX_TBL_ID and GMAX_TBLI_D are same for tab_name1 then echo message "all table ids are processed"
Step 2: go back and call start_load for tab_name2 and check if table id are same for table 2 too.
Please let me know how to... (5 Replies)
Discussion started by: sandy162
5 Replies
8. Shell Programming and Scripting
I have a function which does awk proceessing
sub mergeDescription {
system (q@awk -F'~' '
NR == FNR {
A = $1
B = $2
C = $0
next
}
{
n = split ( C, V, "~" )
if... (3 Replies)
Discussion started by: crypto87
3 Replies
9. Shell Programming and Scripting
In my prog if i enter the input for the 1st time it is executing correctly,
but for the second time entire script is not executing it just exiting
my code is
#!/bin/sh
checkpo()
{
echo "Checking the entered PO to create output text file ";
IFS=$'\n'
set -f
var=0
for i in $(cat... (3 Replies)
Discussion started by: Padmanabhan
3 Replies
10. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
CFTP(1) BSD General Commands Manual CFTP(1)
NAME
cftp -- Conch command-line SFTP client
SYNOPSIS
cftp [-B buffer_size] [-b command_file] [-R num_requests] [-s subsystem]
DESCRIPTION
is a client for logging into a remote machine and executing commands to send and receive file information. It can wrap a number of file
transfer subsystems
The options are as follows:
-B Specifies the default size of the buffer to use for sending and receiving. (Default value: 32768 bytes.)
-b File to read commands from, '-' for stdin. (Default value: interactive/stdin.)
-R Number of requests to make before waiting for a reply.
-s Subsystem/server program to connect to.
The following commands are recognised by :
cd path
Change the remote directory to 'path'.
chgrp gid path
Change the gid of 'path' to 'gid'.
chmod mode path
Change mode of 'path' to 'mode'.
chown uid path
Change uid of 'path' to 'uid'.
exit Disconnect from the server.
get remote-path [local-path]
Get remote file and optionally store it at specified local path.
help Get a list of available commands.
lcd path
Change local directory to 'path'.
lls [ls-options [path]]
Display local directory listing.
lmkdir path
Create local directory.
ln linkpath targetpath
Symlink remote file.
lpwd Print the local working directory.
ls [-l [path]]
Display remote directory listing.
mkdir path
Create remote directory.
progress
Toggle progress bar.
put local-path [remote-path]
Transfer local file to remote location
pwd Print the remote working directory.
quit Disconnect from the server.
rename oldpath newpath
Rename remote file.
rmdir path
Remove remote directory.
rm path
Remove remote file.
version
Print the SFTP version.
? Synonym for 'help'.
AUTHOR
cftp by Paul Swartz <z3p@twistedmatrix.com>. Man page by Mary Gardiner <mary@twistedmatrix.com>.
REPORTING BUGS
Report bugs to http://twistedmatrix.com/bugs/
COPYRIGHT
Copyright (C) 2005-2008 Twisted Matrix Laboratories
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
BSD
October 8, 2005 BSD