I am writing some shell script to check the file owner permission whether the write bit is turn on. If it is turn on it will copy the file to the destination else it will just prompt user to change the file and skipping it.
However, I am starting getting loss here as I have couple of issues that I am facing:
1. first the file could be using regular expression in the file for example file* or file?? which is usually handling pretty well if you are using cp command to handle but in script I will have to warn user to put quote.
2. My current script also have limitation that it cannot directory.
Is there any easier way of how the script to structure. For example, let say the user can just like what they did in typical cp command just run
and the script will check through the file owner permission and if it is directory it will check those file permission inside (we do not have to check directory permission).
The more I write my current script the more I find its limitation.
I always thought there should an easier way to just pass the script -s source -t target to cp -pr source target in an easier way.
Last edited by Scott; 04-23-2011 at 02:24 AM..
Reason: Please use code tags
Hi
I have a text file (INPUT.TXT) of three columns assuming they are separated by tab. The format is given as:
Column1 Column2 Column3
aaa NO aaa
bbb YES asdf
ccc YES yyasdf
ddd NO ddd
eee ... (3 Replies)
Hello,
I am having an odd problem in open suse 12. I have a shell script and when I try to run it, I get "permission denied" The permissions from ls -l are,
-rw------- 1 user1 users 25904 Jan 10 16:26 script.sh
I have tried to change the permissions in dolphin but this does not change the... (5 Replies)
Hi All,
I am a beginner in this and trying to write a shell script in linux which will :
1. Ask for a file name and check if its exists.
2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists.
3. If target folder... (3 Replies)
Hi All,
I am not able to figure out what is the problem with calling a shell script within a shell script.
i have given all the permissions to both schell scripts.
but when i am seeing the log file error is coming like
weekly_us_push_rpts_tst.sh: ./vacation_quota_summary_detail.sh: Execute... (9 Replies)
All,
I have to write a script to do the following requirement.
There is a file called BUSINESS_DATE.TXT.
This file get updated once the oracle partition created. In Oracle, Partition will be created every day. There is a seperate script scheduled to take care ORACLE partition creation.
The... (3 Replies)
I want to check access rights permissions not for 'user', not for 'group', but for 'others'.
I want to do it by system command in which i want to use 'ls -l' and 'awk' command.
I have written the following program :
#!/usr/bin/local/perl
#include <stdlib.h>
system ("ls -l | awk... (1 Reply)
Have the following in a .sh file.
printf "Installing ... \ r"
cd $ ORG_DIR / a_a
. / configure> error.log
Make 1> error.log 2> error.log
make install> error.log
But when I run I get the following.
install.sh: line 270:. / configure: Permission denied
make: *** No rule two make target... (3 Replies)
HI all,
I want to script where all the server names will be in a text file like
server1
server2
server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Hi all,
I need a script in ksh:
1: Copy files from directory (A) to directory (B)
2: Check if files that will be copied in directory (A) have never been yet copied to (B)
3: Never copy the last created file of directory (A)
This script will run on crontab.
Thanks in advance for your... (1 Reply)
I just need the shell script that checks your user id and your permission level. I sort of have one to check the user id but I don't like it. Can anyone help with this? (3 Replies)