10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Im trying to search for a single variable in the first field and from that output use awk to extract out the lines that contain a value less than a value stored in another variable. Both the variables are associated with each other.
Any guidance is appreciated.
File that contains the... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
2. Shell Programming and Scripting
Friends,
I pass some runtime arguments (date, number) through ksh script to Oracle procedure, use input value and pass it on to procedure.
Oracle procedure gets input value, run query and logs everything in the logfile.
I'm facing with couple of challenges
1. Even though I pass all... (5 Replies)
Discussion started by: homer4all
5 Replies
3. Shell Programming and Scripting
Bonjour,
I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things.
The script use the following technique :
tail -fn0 $logfile | \
while read line ; do
... some stuff
done
First one, I'd like a way to end the monitoring script if a... (3 Replies)
Discussion started by: Warluck
3 Replies
4. UNIX for Dummies Questions & Answers
Friends,
Below is the script which writes output to LOGFILE, however I want the entire log written to LOGFILE and also console.
Please suggest me the changes I need to do here.
#!/bin/ksh
x=${0##*/}
LOGFILE="x.log"
echo "CAUTION : Files once deleted cannot be restored"
printf 'Would... (8 Replies)
Discussion started by: fop4658
8 Replies
5. Shell Programming and Scripting
I created a script to do some work. I want to use "echo" to redirect "date" to log file. echo works to screen. But cannot redirect first or second "echo" output to logfile. Please help. My code looks like:
STARTTIME=`date +%m-%d-%Y`
LOGFILE=/directory/logfile.log
echo "Start time:" $STARTTIME... (8 Replies)
Discussion started by: duke0001
8 Replies
6. Shell Programming and Scripting
I'm using bash the code is
QEMU_CMD="qemu-system-x86_64 -smp 2 -m 512 $QEMU_PARAMETER -hda $GUEST_IMAGE -kernel $GUEST_KERNEL -append \"root=/dev/hda rw console=ttyS0,115200 ip=$IP_PARAMETER \" -nographic"
echo "..............................."
echo "qemu command is... (9 Replies)
Discussion started by: yanglei_fage
9 Replies
7. Shell Programming and Scripting
I am looking to parse a text file output and set variables based on what is cropped from the parsing.
Below is my script I am looking to add this feature too.
All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the... (4 Replies)
Discussion started by: es760
4 Replies
8. Shell Programming and Scripting
Hi Dudes,
Can you please suggest me how to create a logfile to track the below script output ? Thanks
#!/bin/ksh
# backup the "std" I/P file descriptor
exec 5<&0
#echo "Proceed ?"
while read config_line; do
# backup the I/P file descriptor of "while" block
exec 6<&0
# restore the... (2 Replies)
Discussion started by: shirdi
2 Replies
9. Shell Programming and Scripting
I have a variable which has a full path to the file, for example :
A=/t1/bin/f410pdb
Does anybody know the command to parce this variable and assign the result to 3 other variables so each subdirectory name will be in a new variable like this
B=t1
C=bin
D=f410pdb
Many thanks -A (5 Replies)
Discussion started by: aoussenko
5 Replies
10. Shell Programming and Scripting
I have a variable (it is a date actually -> 2007-01-03) which
would be passed in as parameter, what I want is to parse in and put
year, month, and day in separate variables, I have tried the following
but doesn't work
echo $dt | awk -F- '{print $1 $2 $3}' | read y m d
Thanks in... (2 Replies)
Discussion started by: mpang_
2 Replies