Hi Guys,
I have a loop which uses a wildcard
i.e. foreach f (*)
but when I execute the tcsh file in unix then it gives me an error
->>>>>>>foreach: words not parenthesized<<<<<<<<<<-
Any help. (1 Reply)
In a foreach loop, is it possible for the loop to go through 2 arguments instead of one
i.e. instead of foreach i (do stuff for i), we have foreach i j(do stuff for i; do stuff for j)
I am working under BASH and TCSH shell environments
cheers (3 Replies)
Hi everyone
Does anyone know what is wrong with this script. i keep getting errors
foreach filename (`cat testing1`)
set string=$filename
set depth=`echo "$string"
echo $depth
end
the error is the following
testing: line 1: syntax error near unexpected token `('
testing: line 1:... (3 Replies)
Hi All,
Is there any problem with the below 'foreach' loop?
foreach risk_factor ($(cat "$rf_list"))
where "rf_list=$SCRIPT/Utility/rflist.txt "
I'm wondering, it is throwing below error message:
syntax error at line 34: `(' unexpected
Any idea/suggestions ?
Thanks in advance /... (7 Replies)
So I am back again beating my head against the wall with a shell script and getting a headache! I want to change each year in a file (1980, 1981, 1982, 1983, etc.) to the same year followed by a tab.
The input is "blah blah (1980) blah blah".
I want to get "blah blah (1980 ) blah blah".... (2 Replies)
I am trying to make a script for my Counter-Strike: Source servers. What i am wanting it to do is for it to restart each server, the only way i can think of doing this in through for each.
Years what i have at the moment.
server_start() {
START=`ps x | grep SCREEN | grep $SRV | cut -d '?' -f... (5 Replies)
Dear all,
I wrote a script to download files and move files in directories according to their name.
Now here is the problem:
Both p101 and p360 data download successfully, but when I move them according to the year and month, only p101 data can be placed at the right location, p360,... (1 Reply)
Hi everyone I'm new to unix and encountered a small problem i couldnt find out a reason why it doesn't work..please help..
in my csh script when i tried to use the foreach loop like this:
foreach x ( ls )
echo $x
end
when i tried to run it, it printed out 'ls' to the std out instead of... (3 Replies)
I need to put together a script that will take the contents of two different files (database name and database owner) and put them in two variables within a line:
foreach x (`cat /local/hd3/dba/tools/build_db_scripts/dbs`)
foreach z (`cat /local/hd3/dba/tools/build_db_scripts/dbas`)... (6 Replies)
Discussion started by: deneuve01
6 Replies
LEARN ABOUT DEBIAN
jocamllex
JOCAMLLEX(1) General Commands Manual JOCAMLLEX(1)NAME
jocamllex - The JoCaml lexer generator
SYNOPSIS
jocamllex [ -o output-file ] [ -ml ] filename.mll
DESCRIPTION
The jocamllex(1) command generates Objective Caml lexers from a set of regular expressions with associated semantic actions, in the style
of lex(1).
Running jocamllex(1) on the input file lexer.mll produces Caml code for a lexical analyzer in file lexer.ml.
This file defines one lexing function per entry point in the lexer definition. These functions have the same names as the entry points.
Lexing functions take as argument a lexer buffer, and return the semantic attribute of the corresponding entry point.
Lexer buffers are an abstract data type implemented in the standard library module Lexing. The functions Lexing.from_channel, Lex-
ing.from_string and Lexing.from_function create lexer buffers that read from an input channel, a character string, or any reading function,
respectively.
When used in conjunction with a parser generated by jocamlyacc(1), the semantic actions compute a value belonging to the type token defined
by the generated parsing module.
OPTIONS
The jocamllex(1) command recognizes the following options:
-o output-file
Specify the output file name output-file instead of the default naming convention.
-ml Output code that does not use the Caml built-in automata interpreter. Instead, the automaton is encoded by Caml functions. This
option is useful for debugging jocamllex(1), using it for production lexers is not recommended.
SEE ALSO jocamlyacc(1).
The Objective Caml user's manual, chapter "Lexer and parser generators".
JOCAMLLEX(1)