10-03-2001
Batch file update
I have a data file with 4 columns of numbers with a space delimiters.
I have a script that I can run from the command line that will insert parameters directly on the command line. For example:
script.ksh 100 200 300 400
What I am trying to do is do a mass update using a big data file, and I don't want to type in these thousands of numbers line by line. I'm sure there is a way of doing this, but I wouldn't even know what to search on to see if it's been done before.
Can anybody help please.
Thanks
9 More Discussions You Might Find Interesting
1. IP Networking
my requirment is
i have to call a batch file from a c++ program
that batch file is called with the argument as print.txt
print.txt is a text file which should get printed on printer (any printer) when a batch file call is made
1) how to call a batch file in c++
2) how to print the text... (1 Reply)
Discussion started by: ramneek
1 Replies
2. Programming
what is a command to call a batch file from a c++ program
when called with the argument which is a text file, then how to print that text file on a printer.
please help me with code if possible (3 Replies)
Discussion started by: ramneek
3 Replies
3. UNIX for Dummies Questions & Answers
hi
how can i connect to a telnet session using the unix script...
need to create a batch file which has to run daily.
first it has to telnet to a IP then execute certain commands and log the session.
thanks
Aemu (1 Reply)
Discussion started by: aemunathan
1 Replies
4. UNIX for Advanced & Expert Users
EDIT: Is this wrong thread?
Hi I am on an Apple Mac and I am trying to run this batch file on my Mac and was wondering if anyone could tell me what a script that will make this run and work on my Mac. I was hoping that you could tell me the script in the shell format?
So here's the batch... (4 Replies)
Discussion started by: Billy5555100
4 Replies
5. Windows & DOS: Issues & Discussions
Hello, this is my first post and i hope you can solve my problem.
I need to create a batch file that will copy folder from hard drive on to usb stick on daily basis.
Can you help me and write that file and explaine me what to do next.
Folder's location is: c\windows\desktop\2009
Thank... (5 Replies)
Discussion started by: hule
5 Replies
6. Shell Programming and Scripting
Hi
I have to create a windows batch file which will read an input file and remove "double quotes" from each line of the file.
For eg.If input file name is abcd.csv and contents is :
"asasd,123123,213213,asd"
"esfrf,dsfsdf,234324,sdfsdf"
Then the batch file should remove "" from the... (11 Replies)
Discussion started by: akashtcs
11 Replies
7. UNIX for Advanced & Expert Users
Hi all
I am using tru64 Unix and I want a ready batch file which makes me to change all user passwords at the same time ,instead of changing everyone separately.
Please could anyone help me to do that.
bye. (1 Reply)
Discussion started by: ahmedbashir
1 Replies
8. Shell Programming and Scripting
Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below.
I am on a solaris server btw.
Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose.
... (2 Replies)
Discussion started by: goddevil
2 Replies
9. Shell Programming and Scripting
Hi guys,
I need a script to change the file names e.g.:-
below are the mentioned files, i want t0 change the last character of the name 00000.cdr with e.g bep01.smsc.191214210500-00000.cdr to bep01.smsc.191214210500-92311.cdr next file be like bep01.smsc.191214210500-92312.cdr
# ls -ltr... (9 Replies)
Discussion started by: mfaizan40
9 Replies
exit(1) User Commands exit(1)
NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps
SYNOPSIS
sh
exit [n]
return [n]
csh
exit [ ( expr )]
goto label
ksh
*exit [n]
*return [n]
DESCRIPTION
sh
exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of
the last command executed (an EOF will also cause the shell to exit.)
return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe-
cuted.
csh
exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the
expression expr.
The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches
for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to
jump to a label that occurs between a while or for built-in command and its corresponding end.
ksh
exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8
bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing
a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit
except for a shell which has the ignoreeof option (See set below) turned on.
return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the
least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return
is invoked while not in a function or a '.' script, then it is the same as an exit.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5)
SunOS 5.10 15 Apr 1994 exit(1)