Need help with Unix Scripting


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need help with Unix Scripting
# 1  
Old 06-12-2008
Need help with Unix Scripting

Hi to all,

This is Srinivas new to this forum. Actually I am working as Hyperion consultant. I am new to UNIX. But Unix tasks where assigned to me. So some what struggling with these scripts. I hope you all will assist me. I will take care of MAXL scripts. Just need assistance with UNIX scripts. For granting filters we use GRANT command in MAXL scripts so don't stress on this.

Unix Scripts and Text Files for the Web Menus

To accomplish the above process, we will need a few Unix scripts and a couple text files

Text Files
1. A list of plant groups
2. A list of divisions

Unix Scripts
1. A script that takes 2 parameters: the group name, and the filter end ( _w or _r ) and runs a MAXL script to change the group's access to the appropriate filter
2. A script for opening all write access which will read both text files and call script 1 with _w option
3. A script for closing all plants but keeping divisions open which will call script one for each plant in text file 1 and send the _r option. It will also read text file 2 and call script 1 for each division with the _w option.
4. A script for close all plants and divisions (_r for all entries in both text files)
5. A script for closing the forecast completely ( same as script 4, except will also change the allmfg group to _r
# 2  
Old 06-12-2008
I am glad we don't have to care about the MAXL scripts and you take a bit chunk of work for us, thank you, honestly.

I suggest, you get one of that 1001 good books about shell scripting, as this question, or may I say job or order is a bit much.
A little hint: You can put these very easy commands and parameter parsing all in one script.

For generating textfiles, use any editor you like. Or write it down with a pencil, scan it, and have the OCR software do the rest!
Might make not much sense if some stranger creates some fantasy lists with plant groups and units?! It is not really that hard, come on.

Good luck on your future projects.
Couldn't resist.
# 3  
Old 06-12-2008
Question Often easier to get feedback when you provide samples with real data

Recognizing that sometimes data is confidential, it can be changed, but the general rules should still apply to the samples. Many on this Board can make data and commands do most anything. However, I am stumped by the text of your request. I just do not understand what you mean by closing plants and forecasts - are you talking about closing a file?

Suggestion: break this into smaller sections, and provide data that is known (input), rules and desired data output. You have two text files that contain info, but no rules that those files must follow. Such as - are plants and divisions number or text codes, etc...
# 4  
Old 06-12-2008
Sorry for confusing you

1) Just I need Unix script on how to read the data from a text file and passing them as parameters in the same script.
2) How to call a new script from the current script.

However, I am using the script below which will read the file and use the file contents as parameters to two variables.
#########Script to read the plant groups####
#!/bin/ksh
export PASSLIST="plant_group.txt"
while read GROUP FILTER
do
echo "GROUP=$GROUP"
echo " FILTER=$GROUP"

done < $PASSLIST
~
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX scripting

LIST=/home/xxxxxxx/ABC/xeeno_scrpts/temp/tempfile ERRORDIR=/home/xxxxxxx/ABC/error_directory EMAILFILE=/home/xxxxxxx/ABC/xeeno_scrpts/temp/emailfile echo "There were errors in the following report file for Xeenos:" > $EMAILFILE echo >> $EMAILFILE echo "This files have been moved to... (9 Replies)
Discussion started by: bcarosi
9 Replies

2. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies

3. UNIX for Advanced & Expert Users

Unix scripting

i need help with this problem this is the problem: Write a script that logs how many users login on/off the system over a 5 minute period. It can run in the foreground, and run 4 times a minute. Set a trap that will not allow a CNTRL-C command, and if a CNTRL-C is excuted store the time and date... (1 Reply)
Discussion started by: sportsmansixty6
1 Replies

4. Shell Programming and Scripting

Unix scripting

how to check if a unix script gets executed without errors across all unix platforms. incase if a script gets executed without errors only one platform say AIX, what needs to be done to that script such that it will run all unix platforms like linux, hp, sun etc (2 Replies)
Discussion started by: rmann
2 Replies

5. Shell Programming and Scripting

Unix Scripting

Hi Gurus, I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (4 Replies)
Discussion started by: madanmeer
4 Replies

6. UNIX for Dummies Questions & Answers

Unix Scripting

Hi Gurus, I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (1 Reply)
Discussion started by: madanmeer
1 Replies

7. UNIX for Dummies Questions & Answers

Unix scripting pl help

Hi All, I am new to Unix Scripting. I have below scenario. I need to write a Unix function with the following. 1. I have table. From this table I need to write a query. SELECT Col1(File_nm),Col2(From_Loc),Col3(To_Loc) FROM A WHERE CONDITION For... (1 Reply)
Discussion started by: sree11
1 Replies

8. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

9. UNIX for Dummies Questions & Answers

Help With Unix Scripting.

Can anybody tell me the best way to learn unix scripting.can you recommend a good book.Please help! (1 Reply)
Discussion started by: hella
1 Replies

10. UNIX for Dummies Questions & Answers

UNIX Scripting

:confused: I need to find a place or places on the Internet where I can find UNIX scripts to view and to modify to make life easy on the UNIX environment. Can someone help me on this. Thanks (7 Replies)
Discussion started by: wolf
7 Replies
Login or Register to Ask a Question