10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have written a script to automate scp of files. Most of the times it works fine except few cases. I want your help and suggestions to fix these failures.
I have used expect & shell to do the automated scp. Below is code
$ cat scp.ksh
#!/bin/ksh
inputfile=$1
fdest_sid=$2... (8 Replies)
Discussion started by: veeresh_15
8 Replies
2. Shell Programming and Scripting
Hi,
I need a script to execute below task. As of now I am doing it manually and want it automated.
1)go to below path
cd /path/of/file
check for the availibility of two file as below of the latest date.
test.week1.data
test.week2.data
Case1. If above files are not present... (3 Replies)
Discussion started by: sv0081493
3 Replies
3. UNIX for Dummies Questions & Answers
if i have a script called test.sh
file1=$(ls -l|awk '{print $9 $1}')
awk ' /date_of_selling:/ { print $6 ":" &9 }' /$file1 >> data.txt
if i wanna this script to run automatically every day at 8 am :D (3 Replies)
Discussion started by: teefa
3 Replies
4. Shell Programming and Scripting
Hi all -
I have a script which runs on the OS level, but refuses to run as a cron or as an Oracle job. The Script is pretty straight forward:
#!/bin/bash
username="MyUsername"
host="Remote.server"
path="Remote.directory/files/*.*"
password="MyPassword"
expect -c "
spawn /usr/bin/scp... (3 Replies)
Discussion started by: danimaltex
3 Replies
5. Shell Programming and Scripting
Hello, how can I write a shell script that looks in running processes and if there isn't a process name containing 91.34.124.35 then execute a file in a certain place.
I know PHP, in PHP I could do a preg_match_all but I don't know how to do it in shell. (5 Replies)
Discussion started by: nottingham
5 Replies
6. UNIX for Advanced & Expert Users
Hi
My requirement is i want to copy files from remote server to the local server and also i need to preserve the timestamp of the remote file.
By using scp -p , it is working fine in the interactive call but it is not preserving he file timestamp when i use it in the non interactive scp call... (1 Reply)
Discussion started by: skumar75
1 Replies
7. UNIX for Dummies Questions & Answers
I want to create an automated backup script that will copy files to different directories for different days. I will use a detachable USB drive, under SCO 5.0.7. I am very new to Unix, and will require most of the script. Thanks (5 Replies)
Discussion started by: Bennieinbots
5 Replies
8. Shell Programming and Scripting
echo "Enter your choice :\c"
read num
case $num in .
1)"${TEST_HOME}"/ctrl_extract.ksh 1 ;;
2)"${TEST_HOME}"/ctrl_extract.ksh 2 ;;3)"${TEST_HOME}"/ctrl_extract.ksh 3 ;;
4)"${TEST_HOME}"/ctrl_extract.ksh 4 ;;
5)"${TEST_HOME}"/ctrl_extract.ksh 5 ;;... (3 Replies)
Discussion started by: arghya_owen
3 Replies
9. Shell Programming and Scripting
I'm totally new to shell scripting and I would like to ask your help
1.i want to have a .sh script where it runs opening 2 applications one after another
2.i have 2 applications in
/applications/app1
/applications/app2
3. want this script to launch app1 for 20 seconds and get killed... (2 Replies)
Discussion started by: uneex
2 Replies
10. UNIX for Advanced & Expert Users
Hi ALL:
I need to write a script that will start bunch of servers. and these servers each has a sudo account and they need a passowrd.
I dont know where to start and look.
Can you please give me some hints or some sample code.
Thanks in advance.
splax (4 Replies)
Discussion started by: splax
4 Replies