Any script whose interpreter can find the script with at most one extra argument, ike ksh or sed -f or awk -f, can be made into a barefoot, freestanding executable with one line and file mode bits.
Any directory in your $PATH is searched for executables by entry name.
Make your awk scripts executable, put them in a application-dedicated bin directory, put that directory in your $PATH, and just call them without the awk, -f, path.
Suppose I was doing something similar:
I type: mkdir ~/bin
and in there I put a file davidx, and in that file I have:
I type: chmod u+x ~/bin/davidx
to add execut for me.
I type: PATH=$PATH:~/bin
and add that line to my: ~/.profile
Now, I can just say this in my shell script david_sh: davidx option1 option2 ...
I should put my shell script david_sh in ~/bin, too. Then, I can call it by just typing entry name david_sh when I test. If it is a ksh script, it should look like:
Your interpreter paths (/usr/bin for ksh, awk) may vary.
There's one problem. I actually go to a different machine, which can see the Scripts and working directories and run everything from there. The thing is that I cannot change stuff on them. Can't use my machine as it's too slow.
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
It is for HP-Unix B.11.31.
Requirement:
1. List the directories, having given pattern in the directories name, sorted by creation date.
Example: Directories with name "pkg32*" or "pkg33*"
2. On the output of 1. list the directories by creation date as sort order, with creation date... (2 Replies)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Hi all,
Using grep command, i want to find the pattern of text in all directories and sub-directories.
e.g: if i want to search for a pattern named "parmeter", i used the command
grep -i "param" ../*
is this correct? (1 Reply)
I am trying to understand a program in a book and this program suppose to call other programs which are in the same folder, the other programs are called 'lu' and 'add' but for some reason when it gets to the last line of each case to call these programs there is an error message saying
./rolo:... (2 Replies)
Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Hello all,
Here's the deal...I have one directory with many subdirs and files.
What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file.
A script for... (5 Replies)
Hi. I have a problem in running a program in linux system. This program (damaver.l86) is in the path /home/shenk/damaver/, and it needs to call another program (supcomb.l86) in another path /home/shenk/supcomb/. I tried to modified the .bash_profile, but it didn't work. The error message is always... (1 Reply)