10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I have this script to count the number of files based on prefix and suffix values.
#!/bin/ksh
file_date=$1
prefix=$2
suffix=$3
file_count=$(ls -l /db/day_file/{$prefix}*${file_date}*{$suffix})
The files in the directory /db/day_file are as below.
20170501
20170501... (7 Replies)
Discussion started by: nalu
7 Replies
2. Shell Programming and Scripting
Hello everybody
Im learning bash scrpting language and im making a script that read a file line by line and it does a comparison if in a line start with a letter or number and it will delete every ones that start with a letter. But im getting some errors
First of all, this is the script's... (5 Replies)
Discussion started by: alienrunes
5 Replies
3. Shell Programming and Scripting
Hello,
i have below shell script to process ftp get from server and create file list afte finish.
this shell scipt has 6 parameter input.
unfortunately, it is only working to get the file and terminated before creating file list.
please help.
thanks,
#!/bin/ksh
## example usage :... (3 Replies)
Discussion started by: daryatmo
3 Replies
4. Shell Programming and Scripting
Hi ,
I am using the below command in script. $_IDLETIME is returning value if i execute the script manually.
sar > $_LOCATION/sar.txt
_IDLETIME=`tail -2 $_LOCATION/sar.txt | head -1 | tr -s ' ' ' ' | cut -d ' ' -f8 | cut -d '.' -f1`;
if
But it s not returning any value if it put the... (3 Replies)
Discussion started by: ahamed
3 Replies
5. Shell Programming and Scripting
Hi
I am a novice Linux/Perl user and am struggling to overcome what I am sure is a simple problem.
I am using a perl program to create a shell script daily containing between 10 and 30 "at -f" commands for the same day. Then I change the file attributes to allow the file to be executed. When... (2 Replies)
Discussion started by: simoncjones
2 Replies
6. Shell Programming and Scripting
Hi,
I have a script which does a tar and sends it to another server as backup.
Script is as below
# Locations to be backed up. Seperate by space
BACKUP_LOCATIONS=/repos/subversion
BACKUP_BASE_FOLDER=/bakpool
BACKUP_FILE_NAME_ROOT=svn-backup
START_TIME_DISP=`date`
START_TIME=`date... (11 Replies)
Discussion started by: digitalrg
11 Replies
7. Shell Programming and Scripting
I have a simple script that checks for certain printers and records them to a file.
When I run the script manually at the command prompt, it works perfect, but when I run the script via cron, nothing happens. No errors reported, and no records are written out. I'm using Solaris 10. Below is the... (4 Replies)
Discussion started by: lmatlebyane
4 Replies
8. Shell Programming and Scripting
When i run sh -x test.sh, expr outputs x=expr $x + 1 instead of doing the arithmetic.. been working on this overnight.. and its being a pain in the arse if you ask me.. :confused::confused:
#!/bin/sh
#script for downloading numerical filenames
chap=1
p=1
count=0
x=1
while
do
if ... (2 Replies)
Discussion started by: aspect_p
2 Replies
9. UNIX for Dummies Questions & Answers
I created a script before which was this :-
cd /mike/dataxfer
for dir in *; do
if ; then
ssh -l abc nissan "mkdir -p /mike/web/$dir"
scp -r ${dir}/priceops nissan:mike/web/${dir}/
fi
done
exit 0
This script worked fine for me with no problem. It will... (5 Replies)
Discussion started by: chris1234
5 Replies
10. Shell Programming and Scripting
Hi I am trying to create a shell script that will
look for a contracthead file first and if the contract head file does not exist on day1 exit script.
Now on day2 if contracthead exists or not run the script uploading files in order
such as contract line then contract contact
so the... (2 Replies)
Discussion started by: jonathan184
2 Replies