My SAP application is running in IBM AIX. Everyday my application generate some files in the below path as below.
We are zipping all the files and keeping the same directory in every Friday.
I want to make a small shell script to zip the files and keep the same dir.
can someone help me on this please.
facing issues:
1. I am not AIX administrator and not work much in shell script
2. There is no extension of these files to filter for zipping
Note: Files to be zipped and kept in the same dir with same name.
currently I am using the below syntax to archive the file.
Thanks & Regards
Sundar.C
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 05-14-2018 at 05:42 AM..
Reason: Added CODE tags.
Please post in an adequate forum, and use code tags. Show your attempts / ideas / thoughts on a solution.
There don't seem to be access / permission problems as your manual zipping works.
What is your shell (version)? Depending on it the file selection can be reliably simpified, or not.
One more comment: your command syntax seems questionalble: zip needs the archive name first, and then the file names to be combined into the archive. The .gz ending usually identifies gziped data, not zipped ones.
Hi All,
I am connecting from ServerA(Unix) to ServerB (AIX). Copying a Database dump file from A to B. On B i need to import that dump file.
I have used the following code to do this operation but ended up with error
Pseudo-terminal will not be allocated because stdin is not a terminal.... (2 Replies)
Hi ,
Good Morning every one !!!
I am very new to this forum and new to Shell Script as well , hope some script Guru's will help me .
I have a requirment to write a shell script . The requirment is like this . There are couple of shell scripts scheduled in the Crontab (some scripts run... (5 Replies)
Hi.
I created schell script for sending messages to some processes in AIX:
#!/bin/sh
BSE=/infor/ERPLN/bse
BSE_TMP=/infor/ERPLN/bse/tmp
export BSE BSE_TMP
for i in `ps -eo pid,comm | grep bshell | cut -f 1 -d " "`
do
/something $i
done
Unfortunatelly this script does not work on... (6 Replies)
Hi,
When I run the following script from a shell it works fine as root. But when I try to run from cron as root it fails everytime? I set the scripts I run in cron to send me the output if they fail but this produces nothing. Please see script below, maybe someone can see whats wrong as I'm... (3 Replies)
Hi!
I have made a simple script for writing the following line on a file (file.txt):
list= 1 2 3
and thr script looks like this:
N=3
ll=(1 2 3)
echo -n "list= ">> file.txt
j=0
while ; do
echo -n ${ll}" ">> file.txt
let j++
done
The code works fine on Linux,... (3 Replies)
I have av script that loops through some statistic files to create a report. We would like to only loop through non-empty files as these files create an empty report-line.
I have figured out how to find the non-empty files, but not how to loop through only those files.
Here is the code that finds... (4 Replies)
Hi,
I am porting one shell script from Linux to AIX. I had .ksh file and i have changed it to .sh file for aix. on linux this script is running fine but on aix it gives me "unexpected end of file" error.
Could any one suggest me what to do to port this script error free?
Thanks in... (6 Replies)