9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Tech Guys,
I am trying to send some commands on the local server and it always asks for user name and password after each command. To serve the purpose I am using expect function as follows:
#!/usr/bin/expect
set timeout 20
spawn "./data1.sh"
expect "Please Enter UserName: "... (6 Replies)
Discussion started by: Xtreme
6 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I want to run my script and want to ensure it captures all logging.
For e.g I got this from another forum
# Redirect the current stderr into stdout
exec 2>&1
# Redirect the current stdout into the log file
exec 1>timer_log.log
The script will print stderr onto the putty terminal... (4 Replies)
Discussion started by: aixkidbee
4 Replies
3. Shell Programming and Scripting
Hi,
I wanted to add a email option to this script. and was wondering if anyone could help me out.
#!/bin/ksh
echo "Finding hdisk"
<DIR>/find-disk
i=1
b=0
p=0
while ... (2 Replies)
Discussion started by: vpundit
2 Replies
4. Shell Programming and Scripting
Hi,
I need a ksh script for the below requirement:
i have a Delimited flat file with 200 records delimiter is '|~|'
i need a script to insert space at the end if the record is ending with delimiter '|~|'
if it didnt end with delimiter it should not append space.
Example: ram|~|2|~| ... (16 Replies)
Discussion started by: srikanth_sagi
16 Replies
5. Shell Programming and Scripting
Hi there,
I'm encountering problems on an AIX system when using following in my script.
find . -name *.edi -type f -exec sh -c 'scp {} $user@$server:$path || exit 5; mv {} $sent || exit 7' \;
the error i get is following
find: 0652-018 An expression term lacks a required... (4 Replies)
Discussion started by: Kerberos
4 Replies
6. Shell Programming and Scripting
I'm pretty new to bash shell scripting and I was wondering how to add some logging to a script?:confused: (2 Replies)
Discussion started by: kp400sf
2 Replies
7. Shell Programming and Scripting
Hi Forum,
Im trying to write some code to read a file, take a certain dynamic value and write it back to the file at the front of every line.
For example, file.txt is:
SIMPLE=HELLO
CONFIDENTIAL=false
SENDER=false
REQUIRED=true
FEEDBACK=false
UPDATE=false
REQUIRED=false
MAPPING=true... (9 Replies)
Discussion started by: ocelot
9 Replies
8. Shell Programming and Scripting
All,
I would like to add the first 10 elements of an array. Here is how I am doing it now (only included first few add ops):
#!/usr/bin/ksh
###Grab the array values out of a file###
TOTAL=`awk '/time/' /tmp/file.out | awk '{print $4}'`
set -A times $TOTAL
SUM=$((${times} + times... (3 Replies)
Discussion started by: Shoeless_Mike
3 Replies
9. Shell Programming and Scripting
Hi falks,
I have the following ksh function ,which adding entry to crontab during ksh program running:
{
print "Go\c" >/dev/null 2>&1
print '0 0 * * * su - ias -c "/home/orca/core-${SCHEMA_NAME}/CLI/cleanup_BRMS.ksh"\c' >/dev/null 2>&1
print "\033:wq!" >/dev/null 2>&1
} | \crontab -e... (2 Replies)
Discussion started by: nir_s
2 Replies