10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a shell script like that
Main() {
DAY=$(date +"%d-%m-%Y")
TIME=$(date +"%T")
Command 1
Command 2
...
Command n
}
I would like to catch errors from all commands in Main() and write these errors into a file , something likes this:
Main
if < error >
then
echo... (3 Replies)
Discussion started by: bobochacha29
3 Replies
2. Shell Programming and Scripting
Dear all,
We are trying to get file information in a file from our sftp server with the program psftp.
lcd d:\sftpInfo
cd serverInfo
ls *.* > qqqqq.txt
After running the ls command, we see all files who are in the serverInfo directory on the screen. No error is showed.
Our question is:... (3 Replies)
Discussion started by: ton2204
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm using PSFTP to transfer files from one machine to a virtual machine with UBUNTU OS installed on it.
I'm trying to find a way to make sure the files that I'm uploading / downloading are being uploaded/ downloaded properly.
I want to compare the size of the local file and the remote... (0 Replies)
Discussion started by: sessie
0 Replies
4. Windows & DOS: Issues & Discussions
Hello,
I'm looking for a way to use PSFTP or PSCP, executed from a batch file in Windows, to delete an entire folder and its contents. I can run a script using PSFTP which can use rm or rmdir, but the -rf command doesn't work. Any suggestions on another client to use in the same context, or a... (2 Replies)
Discussion started by: ocdcollector
2 Replies
5. Windows & DOS: Issues & Discussions
Hi all pro
I had a script from windows to put diff file from the linux box
but i had stuck on it ,how to play around with the %1
@echo off
"C:\putty\psftp" linux@1.1.1.1 -pw password -bc -b getfile.scr
--getfile.scr
lcd "C:\DATA"
cd logs/
mget %1
Thanks
jiajin (0 Replies)
Discussion started by: lijiajin
0 Replies
6. Linux
Hello friends,
Assume that, I am trying to execute a "db2 connect" command from Linux shell prompt via a shell script called "sample"
sample
db2 connect to bas39
$sample
If the database is not present its should display a custom error message by catching the error message given by db2.... (1 Reply)
Discussion started by: frozensmilz
1 Replies
7. UNIX for Dummies Questions & Answers
Hi everybody,
I'm new to linux world and I need your help!!
I'm using vi to create a .sh script that process files moving them from a directory to another and unzipping a file.
I need to catch errors while moving or unzipping files.
For move command, I do:
mv -f... (2 Replies)
Discussion started by: Laetitia
2 Replies
8. UNIX for Dummies Questions & Answers
psftp binary size is about to 300K and I need a smaller one. anyone suggests any idea? (4 Replies)
Discussion started by: zoque
4 Replies
9. UNIX for Dummies Questions & Answers
I need to search (grep?) a file and send results via email. How can I do this using PSFTP? I'm VERY new and could use all the assistance anyone would be willing to provide.
Currently I log in via PUTTY (HP UX) and type the following...
grep FILENAME /xxx/xxxxxx>/xxx/filename_typemanualdate... (1 Reply)
Discussion started by: newbiepgrmr
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
In my code, I am running rsync, if any error comes, I have to wirte the error to temp file and I want to send this temp file content to specified email address, I am getting starnge outpout, can you pls help to solve this?
My code is:
tempfile=error.`date '+%m%d%Y_%H%M%SGMT'`
rsync -az -e... (3 Replies)
Discussion started by: redlotus72
3 Replies