Sponsored Content
Top Forums Shell Programming and Scripting need help creating a shell that generates another shell Post 302322149 by adshocker on Wednesday 3rd of June 2009 02:45:08 AM
Old 06-03-2009
Quote:
Originally Posted by pludi
Suggestion: one for loop, one echo, one redirection. For more information please tell me of the real-world application (aka "why it's not homework")
hi,

thanks for the info.

basically, to make my task easier i wanted to automate this process. my team lead normally gives me these LDT files that i need to upload to our database and i use the FNDLOAD command to do it. he gives me approximately 50 files a day and then i manually create the shell script for this.

i.e.
-----
FNDLOAD $1 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct "$fndload_ldt_dir/CP_XXAPCHKINVALIDCHARREPORT_US.ldt" \
WARNINGS=TRUE
FNDLOAD $1 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct "$fndload_ldt_dir/CP_XXAPIICR_US.ldt" \
WARNINGS=TRUE
FNDLOAD $1 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct "$fndload_ldt_dir/CP_XXRLAPPREPAYTREP_US.ldt" \
WARNINGS=TRUE
-----

the above commands are what i place inside my shell script and the files CP_XXAPCHKINVALIDCHARREPORT_US.ldt, CP_XXAPIICR_US.ldt, and CP_XXRLAPPREPAYTREP_US.ldt are given by my team lead. these files contains data for upload.

thanks
 

10 More Discussions You Might Find Interesting

1. Programming

Creating new shell in C

Hi, I am a student and I want to create a shell in C language. The shell must be able to take commands(with arguments) from the user and execute them and show the results. Any help or ideas or any suggestions would be greatly appreciated. Thanks (4 Replies)
Discussion started by: passat
4 Replies

2. Shell Programming and Scripting

help on creating shell script

Can some one smart here help I need to create a shell script that does this below using vi editor. decrypts a file (specified as an argument to the script) containing text which was encrypted using the ROT-13 algorithm. The decrypted text should be written to a new file leaving the input file... (1 Reply)
Discussion started by: master_6ez
1 Replies

3. Shell Programming and Scripting

Creating my first Shell Script

I have an assignment in my programming class to write a shell script that will use command line parameters, display the # of parameters, display all parameters on the command line and display the parameters $0-$9. I understand some of the code (I will be using 'n' to represent the count through... (1 Reply)
Discussion started by: plmahan
1 Replies

4. UNIX for Advanced & Expert Users

Creating database in shell, how?!

Hi, i'm newbie in Unix. How can i create my own database in unix shell? Not to create a database through shell to MySql, oracle etc, but to create a completely mine database system through shell. Please help me, give me directions, i'm desperate :( (1 Reply)
Discussion started by: vants
1 Replies

5. Shell Programming and Scripting

Bash shell: Creating Preferences

In OS X I'm currently writing a bash script that requires writing to preference file. I may eventually want to share it with users on other Unix-like OSs and would like to accommodate for that possibility ahead of time. Most OS X applications save preferences in xml-format plist files. These... (4 Replies)
Discussion started by: airsmurf
4 Replies

6. Shell Programming and Scripting

Creating simple shell program

Hi, I'm new to UNIX shell programming... can anyone help in doing the following : 1) create a text file named "Model File" having following columns : Name Number Physics Chemistry 2) prompt user to n rows enter the name, number, physics ,chemistry 3) display the entire columns and rows... (1 Reply)
Discussion started by: Mayuri P R
1 Replies

7. Shell Programming and Scripting

Help with shell script - creating users

echo -e "Enter in a username : \c" read username grep "^$username:" /etc/passwdWhat I'm trying to do is take in a username from my script and I need to be able to check if that username already exists. If it does the script should display a message saying that the user already exists and exit. ... (2 Replies)
Discussion started by: shadowcat
2 Replies

8. Shell Programming and Scripting

Need help in creating arrays using shell

Hi, I need help in creating a array in shell scirpt. I have a file which has following details. hostname devices device1 device 2 de abcdmhs10 1234 2343 2353 3343 3435 2343 bcdfmhs11 2343 2443 3434 8874 0343 3434 (5 Replies)
Discussion started by: jpkumar10
5 Replies

9. Shell Programming and Scripting

Shell script that generates another shell script

If there's a file called example.txt with contents: Foo Bar Baz Goo then I need to generate a shell script that has commands to reconstruct example.txt on another machine: echo "Foo" >> example.txt echo "Bar" >> example.txt echo "Baz" >> example.txt echo... (5 Replies)
Discussion started by: Yongfeng
5 Replies

10. Homework & Coursework Questions

Help with creating a simple shell script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a shell script that accepts two arguments. The two arguments are the name of 2 files. • If the arguments... (3 Replies)
Discussion started by: Scripter12345
3 Replies
GIT-UPLOAD-ARCHIVE(1)						    Git Manual						     GIT-UPLOAD-ARCHIVE(1)

NAME
git-upload-archive - Send archive back to git-archive SYNOPSIS
git upload-archive <directory> DESCRIPTION
Invoked by git archive --remote and sends a generated archive to the other end over the Git protocol. This command is usually not invoked directly by the end user. The UI for the protocol is on the git archive side, and the program pair is meant to be used to get an archive from a remote repository. SECURITY
In order to protect the privacy of objects that have been removed from history but may not yet have been pruned, git-upload-archive avoids serving archives for commits and trees that are not reachable from the repository's refs. However, because calculating object reachability is computationally expensive, git-upload-archive implements a stricter but easier-to-check set of rules: 1. Clients may request a commit or tree that is pointed to directly by a ref. E.g., git archive --remote=origin v1.0. 2. Clients may request a sub-tree within a commit or tree using the ref:path syntax. E.g., git archive --remote=origin v1.0:Documentation. 3. Clients may not use other sha1 expressions, even if the end result is reachable. E.g., neither a relative commit like master^ nor a literal sha1 like abcd1234 is allowed, even if the result is reachable from the refs. Note that rule 3 disallows many cases that do not have any privacy implications. These rules are subject to change in future versions of git, and the server accessed by git archive --remote may or may not follow these exact rules. If the config option uploadArchive.allowUnreachable is true, these rules are ignored, and clients may use arbitrary sha1 expressions. This is useful if you do not care about the privacy of unreachable objects, or if your object database is already publicly available for access via non-smart-http. OPTIONS
<directory> The repository to get a tar archive from. GIT
Part of the git(1) suite Git 2.17.1 10/05/2018 GIT-UPLOAD-ARCHIVE(1)
All times are GMT -4. The time now is 03:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy