10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
2. Shell Programming and Scripting
I am trying to run a script from crontab but the entire script (which is 70+ lines) is written in bash and I need it to run from a certain directory.
So when I run it manually I cd to /local/mnt/scr and then type ./reordersc and it works fine.
However, I want it to run from the crontab and I... (20 Replies)
Discussion started by: newbie2010
20 Replies
3. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
4. Shell Programming and Scripting
I'm trying to create a ksh script to do the following:
1) Ask the user what process they want to search for.
2) Have the script read the input as a variable and use it to search for the process.
3) Display the current time & date, the working directory of the process, and finally display the... (6 Replies)
Discussion started by: seekryts15
6 Replies
5. Shell Programming and Scripting
I have a script that runs fine under my home directory. No syntax errors, runs and returns as expected.
When I migrate the script to the UAT directories on the same server for User testing, I get a syntax error.
I've checked to make sure the .profile I'm using is the same in the UAT... (1 Reply)
Discussion started by: mpflug
1 Replies
6. Shell Programming and Scripting
Hello, I'm trying to create a script that sorts documents by author (found in file name) and then create a directory for that author. For example,
Input:
John - Paper_1.txt
John - Paper_2.txt
Mark - Paper_1.txt
Jill - Paper_1.txt
Output:
dir/John/Paper_1.txt
dir/John/Paper_2.txt... (1 Reply)
Discussion started by: jl487
1 Replies
7. Shell Programming and Scripting
I have three different linux command scripts that I run for 20+ files in one directory.
it goes like this
FIRST SCRIPT:
grep 'something' -w file > newfile1
.
.
.
grep 'something -w file > newfile20
then I take all these 'newfileN' and run this:
awk 'BEGIN {... (20 Replies)
Discussion started by: labrazil
20 Replies
8. Solaris
Hi,
i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell.
How do i distinguish whether my script is run by init process or by shell??
Will the command
/proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies
9. Solaris
hi im a cobol programmer but im new in unix.
I just want to know how can i run script even if it is in other directory??
Thanks, (1 Reply)
Discussion started by: shinjeck
1 Replies
10. Shell Programming and Scripting
When you run a script, how will you know the directory for the actual file that contains the script. The code should be like .Me in VB. I dont know how we do it in unix. Is it possible? (8 Replies)
Discussion started by: alestoquia
8 Replies