10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
i'm trying to write a tcsh script that reads in a text file (one column) and the runs a different command for each line of text.
i've found lots of example commands for bash, but not for tcsh.
can anyone give me a hint?
thanks,
jill (8 Replies)
Discussion started by: giuinha
8 Replies
2. Shell Programming and Scripting
I am reading in a file in a Korn shell script. The file has one header row followed by possibly millions of data rows. I want to do one thing to the header row and write it out to a new output file, then something different to the data rows. My code looks like this:
read header < $infile
... (4 Replies)
Discussion started by: DJR
4 Replies
3. Shell Programming and Scripting
I need to develop a process/daemon which will constantly monitor a file for new entry and execute a command.
for eg, there is a file /var/log/inotify.log
When a new entry like below gets appeneded to this file, execute the command as follows.
/home/user/public_html/bad.php|CREATE
... (2 Replies)
Discussion started by: anil510
2 Replies
4. Shell Programming and Scripting
Hi
I have jobs (some 1000) defined in a file and I want to read those jobs and run a a command.
For example:
jobs.txt
abc
efg
I want to read the entire file and run the following command
Delete -JOB "abc"
Deleteing abc...
Delete -JOB "efg"
Delete efg...
Can somebody help me... (4 Replies)
Discussion started by: karan8810
4 Replies
5. Shell Programming and Scripting
Hi,
I am facing issues with the below:
I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,).
Now i want to read this command from file and execute it.
So my code below is :
Contents in the lookup.lkp file is :
c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies
6. UNIX for Dummies Questions & Answers
Hi,
how do I read in a file which includes a list of workstations and then run a command for each workstation ?
I am unclear which command to use to read in , or is this not possible ?
Thanks, (3 Replies)
Discussion started by: manni2
3 Replies
7. Shell Programming and Scripting
I was trying to write a script that will process recently creatd file.
From below, the script should process input_20111230.dat file.
sam:/top/work/data/input: ls -ltr input_*.dat
-rw-rw-rw- 1 work edprod 455668 Dec 24 09:16 input_20111224.dat
-rw-r--r-- 1 work edprod ... (7 Replies)
Discussion started by: siteregsam
7 Replies
8. Shell Programming and Scripting
I cannot get the following substitution ($ORACLE_SID) to work:
The variable ORACLE_SID is set to wardin my environment. It has been exported.
I have a text file called test.dat:
/u07/oradata/${ORACLE_SID}/extab/finmart/summit/ps_voucher_line_crnt_ex.dbf... (2 Replies)
Discussion started by: bradyd
2 Replies
9. Shell Programming and Scripting
Hi Unix gurus
I have a file containing 2 coloumns. I would like to do a script which reads the lines and executes a command like this:
command <field1> parameters <field2> some more parameters
Please let me know how you would do this without AWK, SED or any other mini language (for special... (5 Replies)
Discussion started by: BearCheese
5 Replies
10. Shell Programming and Scripting
hi all,
there is any command or anything we can use to read the file name and size. thanks (6 Replies)
Discussion started by: s_linux
6 Replies