08-04-2008
i see, thank both of you for clearing this up for me, it is very much appreciated
im sure ill run into you lot more as i go on and on with unix. im the definition of noob at the moment
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a file called Cleaner1.log . This files have some blank lines also.My requirement is that it should ignore the blank lines and give me the lines that contain some data.
I m using this logic in a script:
below the contents of file :
Maximum Time Taken for Processing(Failed) RR... (4 Replies)
Discussion started by: ali560045
4 Replies
2. Shell Programming and Scripting
Hi,
sumdays before i had posted a query with same subject.
i got sum great help from great ppl which solved my problem then.
But now there is a small problem with the code that i need the experts help upon.
for parsing a text
like this
where $ had been the delimiter between... (3 Replies)
Discussion started by: suresh_kb211
3 Replies
3. Shell Programming and Scripting
HI,
command to cat a readable file by ignoring the first line and last line
or command to cat a readable file by ignoring the lines with delimiter
Please advise on this. (2 Replies)
Discussion started by: thelakbe
2 Replies
4. Shell Programming and Scripting
Dear Friends,
I want to decrypt 2 different file types in a folder (ZIP files and GPG files).
Each file type need different decryption syntex.
Hence, the script should identify file type and should act accordingly ignoring file name case i.e. upper or lower case.
Also, the extention can be... (6 Replies)
Discussion started by: anushree.a
6 Replies
5. Shell Programming and Scripting
Hi guys
I have two file which I sdiff.
ie
file 1: AA,12,34,56,,789,101,,6666
file 2: AA,12,34,56,,789,101,,7777
The last comma separated value will always change from one day to the next.
Is there another unix utility I can use that will sdiff two files but ignore the last comma... (1 Reply)
Discussion started by: wny201
1 Replies
6. Shell Programming and Scripting
Hi all,
Given a file name such as
EXAMPLE=lastname-02.30.71-firstname-town-other.tar.gz
How do I print everything before the first dash (i.e. lastname)
Note: I do not know exactly how many dashes or what information there will be in each file name so it is important that the code... (2 Replies)
Discussion started by: bashnewbee
2 Replies
7. Shell Programming and Scripting
Hello,
I have a requirement to ignore few lines in a file before keyword FILEHEADER . As soon as there is keyword FILEHEADER is identified in file , it will form another file with data from FILEHEADER to whatever in file after FILEHEADER.
I wrote
filename=$1
awk... (4 Replies)
Discussion started by: callmatkarna
4 Replies
8. UNIX for Dummies Questions & Answers
How do you write a script to ignore all lines except the --- dash lines and then remove --- dashes from the data in a text file?
Also how do you separate data in a text file with a tab (for example, column1 (software) and column2 (date) ) ?
Here is my scripts : I am getting errors in... (3 Replies)
Discussion started by: dellanicholson
3 Replies
9. Shell Programming and Scripting
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
Lazy(3o) OCaml library Lazy(3o)
NAME
Lazy - Deferred computations.
Module
Module Lazy
Documentation
Module Lazy
: sig end
Deferred computations.
type 'a t = 'a lazy_t
A value of type 'a Lazy.t is a deferred computation, called a suspension, that has a result of type 'a . The special expression syntax
lazy (expr) makes a suspension of the computation of expr , without computing expr itself yet. "Forcing" the suspension will then compute
expr and return its result.
Note: lazy_t is the built-in type constructor used by the compiler for the lazy keyword. You should not use it directly. Always use
Lazy.t instead.
Note: Lazy.force is not thread-safe. If you use this module in a multi-threaded program, you will need to add some locks.
Note: if the program is compiled with the -rectypes option, ill-founded recursive definitions of the form let rec x = lazy x or let rec x =
lazy(lazy(...(lazy x))) are accepted by the type-checker and lead, when forced, to ill-formed values that trigger infinite loops in the
garbage collector and other parts of the run-time system. Without the -rectypes option, such ill-founded recursive definitions are
rejected by the type-checker.
exception Undefined
val force : 'a t -> 'a
=== force x forces the suspension x and returns its result. If x has already been forced, Lazy.force x returns the same value again with-
out recomputing it. If it raised an exception, the same exception is raised again. Raise Undefined if the forcing of x tries to force x
itself recursively. ===
val force_val : 'a t -> 'a
force_val x forces the suspension x and returns its result. If x has already been forced, force_val x returns the same value again without
recomputing it. Raise Undefined if the forcing of x tries to force x itself recursively. If the computation of x raises an exception, it
is unspecified whether force_val x raises the same exception or Undefined .
val lazy_from_fun : (unit -> 'a) -> 'a t
lazy_from_fun f is the same as lazy (f ()) but slightly more efficient.
val lazy_from_val : 'a -> 'a t
lazy_from_val v returns an already-forced suspension of v This is for special purposes only and should not be confused with lazy (v) .
val lazy_is_val : 'a t -> bool
lazy_is_val x returns true if x has already been forced and did not raise an exception.
OCamldoc 2012-06-26 Lazy(3o)