10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
2. Shell Programming and Scripting
I'm trying to do an ls from inside of a ksh script. I loop through the results one line at a time and attempt to do a substitution using sed to convert YYYYMMDD from the older files into the newer files. Basically sometimes the ETL load runs over midnight and half the files are off by one day... (3 Replies)
Discussion started by: Calbrenar
3 Replies
3. Shell Programming and Scripting
Hello, I am writing a script and in this script, I want to be able to have the script continue running if the correct word is not entered...
Here is an excerpt from me script:
read request
if ;
then
echo "You have asked for the System Temperature..."
cat... (1 Reply)
Discussion started by: niconico96
1 Replies
4. Shell Programming and Scripting
Hi all,
I'm trying to run an sql inside a loop which looks like this
#!bin/ksh
while IFS=, read var1 var2
do
sqlplus -s ${USERNAME}/${PASSWORD}@${ORACLE_SID} << EOF
insert into ${TABLE}
(
appt_date
)
values
(
'${var1 }'
);
... (6 Replies)
Discussion started by: ryukishin_17
6 Replies
5. Shell Programming and Scripting
What I'm trying to do is write a bash file that prompts for the user's name and what the want to name the output file. If nothing is entered in either prompt the script must end and not create the output file. This is what I have so far:
#!/bin/sh
echo "What is your name?"
read NAME
if
... (4 Replies)
Discussion started by: kriminul1982
4 Replies
6. Shell Programming and Scripting
Hello,
i am trying to use telnet inside of a ksh script.
i would like to do like the following:
#!/bin/ksh
...
user="user"
hostname="hostname"
telnet -l $user $hostname |&
wait
#end of the ksh
and with this piece of code, i would like to telnet another machine, and let the user use... (4 Replies)
Discussion started by: Jidma
4 Replies
7. Shell Programming and Scripting
Hi there,
I am new to Perl and KSH. The system I am using picks up the KSH scripts and uses them in a batch job control system.
I am trying to set a variable from a perl command
#!/bin/ksh -eaxp
#*******************************************************************************
# Testing... (5 Replies)
Discussion started by: SaadLive
5 Replies
8. Shell Programming and Scripting
Hi All,
I have multiple functions in my script and I'm trying to capture stdout from some of them, but I also do some error checking in them (in the functions that output something to their stdout that needs capturing) and I need to be able to end the entire script with an error message.
... (2 Replies)
Discussion started by: gkubok
2 Replies
9. Shell Programming and Scripting
Hi;
If I do something like this.
dftotalsize=0;export dftotalsize;df -k | grep \/db001 | awk '{print $4}' | while read theinput \
; do export $theinput; dftotalsize=`expr $dftotalsize + $theinput`; export dftotalsize; echo $dftotalsize; done ; echo `expr $dftotalsize \/ 1024 \/ 1024 "GB"
Is... (4 Replies)
Discussion started by: myjess
4 Replies
10. UNIX for Advanced & Expert Users
I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.
... (6 Replies)
Discussion started by: tekline
6 Replies