10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that goes through a 24 hr logfile, And i want to count the instances of a Test01 to 83 and output the sum of all the instances over 24hrs
#/bin/ksh
cat $parse_data | awk '/'$time$i'/ {for(x=0; x<=16; x++) {getline; print}print "--" }' > _hr.txt
for... (2 Replies)
Discussion started by: k00061804
2 Replies
2. Shell Programming and Scripting
Hello
I am trying to send an email when a .KSH script is run on an AIX Machine.
This email will only include a subject line that is made up of variables from within the script, and is as follows:
CURRENT_DATE=`date +%Y%m%d`
TIME=`date`
ADMIN="myname@domain.com"
date
block ()
{
... (4 Replies)
Discussion started by: jimbojames
4 Replies
3. Shell Programming and Scripting
On a very new (11.31) hpux machine, I can no longer execute shell fragements like:
if ; then
. .profile.foo
fi
and get "ksh: test: argument expected"
if I convert this to -d or -f as appropriate (which I've not had to do on older versions of hpux (11.23) nor any other unix platform... (9 Replies)
Discussion started by: Peeter Joot
9 Replies
4. Shell Programming and Scripting
Hi guys!
I have a directory in the production environment from which i have to delete files older then 40 minutes with .pid extention. I wrote a script below for the purpose.
#!/bin/bash
#
# Script to delete specific file older than N minutes.
# OLDERTHAN="40" #40 minutes
... (6 Replies)
Discussion started by: sajid.shah
6 Replies
5. UNIX for Advanced & Expert Users
I needed some help with a script to fetch and delete all records prior to 3 days from now connecting to sybase from sunos. I wrote the following script but not working..can someone please guide me with my code.
Thanks
#!/bin/ksh
##GET PREVIOUS DAY DATE
dt=`date | awk... (3 Replies)
Discussion started by: moe458
3 Replies
6. Shell Programming and Scripting
Hi,
I am trying to call sql script from ksh job with parameters.The parameters passed from ksh job will be used in SELECT query in sql file to SPOOL the data in extract file.My questions are:
1) How to call a sql script from ksh job with parameters?
2) How to use the parameter in sql file to... (1 Reply)
Discussion started by: anil029
1 Replies
7. Shell Programming and Scripting
I'm loading multiple delimited files into an Oracle DB using sqlldr on Unix. I would like to get only the most recent record per each unique key. There may be multiple updates for each key, but I only want the most recent one.
There is a date column in my delimited files, so I'm using cat to... (2 Replies)
Discussion started by: OPTIMUS_prime
2 Replies
8. Shell Programming and Scripting
Hi!
I would like to write a script which remove some files, all beginning with the same prefix :
prefix.1
doc/prefix.2
../prefix.3
etc.
So, I would create a file and chmod it executable. But I dont know how to pass a variable to a script. I would like to write something like
... (2 Replies)
Discussion started by: tipi
2 Replies
9. Shell Programming and Scripting
Hi Guys, I've got an system setup to act as an sftp server. I have a script that allows me to create chroot users running a custom shell within their home directory, it also creates a subdirectory that they can write into. I'm trying to write a script (that I can cron at a later date) that checks... (3 Replies)
Discussion started by: King_Brucie
3 Replies
10. Shell Programming and Scripting
Many of my servers' /etc/group file have many userid's that does not exist in /etc/passwd file and they need to be deleted.
This happened due to manual manipulation of /etc/passwd files.
I need to do this for 40 servers.
Can anyone help me in achieving this? Even reducing a step or two will be... (6 Replies)
Discussion started by: pdtak
6 Replies