04-03-2009
That works both at the prompt and from within the script. Thanks Loads,
Paul H.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm a UNIX novice and am currently using a grep stmt to search for a pattern and send the matching lines to a new file. But what I really want to do is to append the line after the matching line to the matching line in the new file.
Any ideas?
3/17/04 I am using the Bourne shell.
And... (3 Replies)
Discussion started by: CKS
3 Replies
2. Shell Programming and Scripting
I have a file that contains many instances of double dollar signs. I want to use sed to get the first occurrence. for example, given the following data.
#Beginning of file
AB
34
$$
AB
$$
AB
98
$$
I only want to pull out:
AB
34
$$ (1 Reply)
Discussion started by: wxornot
1 Replies
3. UNIX for Dummies Questions & Answers
hello everybody!
I have a html file which is not properly formatted meaning that the whole content is in one line.
I want to to cut out certain parts of that file. Those parts are between ' #" ' and ' " ' and always start with ' sec_ ' and after the ' sec_ ' any number of characters and ' _... (2 Replies)
Discussion started by: MastaFue
2 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies
5. UNIX for Dummies Questions & Answers
I have a directory I need to grep which consists of numbered sub directories. The sub directory names change daily. A file resides in this main directory that shows which sub directories are FULL backups or INCREMENTAL backups.
My goal is to grep the directory for the word "full" and then... (2 Replies)
Discussion started by: SysAdm2
2 Replies
6. Shell Programming and Scripting
I have thousands of files in HTML that looks like this:
....
....
....
<!-- table horaire --> <!-- table horaire -->
<table border="0" cellspacing="0" cellpadding="0" class="tblHoraires" summary="Table des horaires de la ligne 12">
<tr>
<th scope="row"... (13 Replies)
Discussion started by: charafantah
13 Replies
7. Linux
I am stranded with a problem. Please solve.
How will you remove blank lines from a file using sed and grep? ( blank line contains nothing or only white spaces).
I run the below commands of sed and grep but grep isn't giving output as desired. Why?
sed '/^*$/d' blank
grep -v "^*$" blank... (3 Replies)
Discussion started by: ravisingh
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file with reoccurring patterns and I want extract the 3rd line after the match, then delete another pattern from that third line.
For example the file is in the following format:
Hello
Name: Abc
Number: 123
Hello
Name: FQE
Number: 543
This occurs more than 100... (4 Replies)
Discussion started by: wsn
4 Replies
9. Shell Programming and Scripting
Hi ,
I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows.
# diff mir_lex.c.modified mir_lex.c.orig
3209c3209
< if(yy_current_buffer -> yy_is_our_buffer == 0) {
---
>... (5 Replies)
Discussion started by: breezevinay
5 Replies
10. Shell Programming and Scripting
Hello everybody,
I have the following input file:
START ANALYSIS 1
DATA LINE
DATA LINE
DATA LINE
DATA LINE
Libray /home/me/myLibrary
Source library_name_AAAAA
DATA LINE
DATA LINE
DATA LINE
BEGIN SOURCE ANALYSIS
Function A
Function B
Function C
Function D (4 Replies)
Discussion started by: namnetes
4 Replies
GOSH(1) Gauche Commands GOSH(1)
NAME
gosh - a Scheme script interpreter
SYNOPSIS
gosh [-biqV] [-I path ] [-A path ] [-u module ] [-l file ] [-e expr ] [-E expr ] [-f flag ] [--] [ script argument ... ]
DESCRIPTION
Gosh is a stand-alone Scheme interpreter built on top of the Gauche Scheme script engine.
When script is given, gosh loads the script, evaluating Scheme code in it. Then, if the script defines a procedure named main, gosh calls
it with a single argument which is a list of the script name and subsequent arguments. When main returns an integer value, gosh exits with
it as an exit code. If main returns non-integer value, or an error is signaled during evaluation, gosh exits with exit code 70 (EX_SOFT-
WARE). See SRFI-22 (http://srfi.schemers.org/srfi-22/srfi-22.html) for details. If there's no main procedure defined in the script, gosh
exits with code 0 after loading the script file.
If no script file is given, gosh goes into an interactive mode. By default, gosh prompts the user to enter a Scheme expression, read and
evaluates it, then prints the result, until EOF is read. If the standard input is not a terminal, however, gosh doesn't print a prompt; it
allows a user to use gosh as a filter program. This behavior can be controlled by -i or -b option; see below.
OPTIONS
Command line options are processed before loading the script file or entering the interactive mode.
The options -I, -A, -u, -l, -L, -e and -E are processed in the order of appearance. For example, adding a load path by -I option affects
the -l options after it, but not the ones before it.
-V Prints gosh version and exits.
-b Batch mode. Doesn't print prompt even the standard input is a terminal. Supersedes -i.
-i Interactive mode. Forces to print prompt, even the standard input is not a terminal.
-q Prevents reading the default initialization file.
-Ipath
Adds path in front of the load path list.
-Apath
Appends path to the tail of the load path list.
-umodule
Loads and imports module, as if "(use module )" is specified in the code.
-lfile
Loads a Scheme file file.
-Lfile
Like -l, but doesn't complain if file doesn't exist.
-eexpr
Evaluates a Scheme expression expr.
-Eexpr
Same as -e, except that the expr is read as if it is surrounded by parenthesis.
-ptype
Turns on the profiler. Currently type can only be 'time'.
-fflag
Sets various flags.
case-fold uses case-insensitive reader (as in R5RS)
load-verbose report while loading files
no-inline don't inline primitive procedures and constants
(combined no-inline-globals, no-inline-locals, and
no-inline-constants.)
no-inline-globals don't inline global procedures.
no-inline-locals don't inline local procedures.
no-inline-constants don't inline constants.
no-post-inline-pass don't run post-inline optimization pass.
-Ffeature
Makes feature available in cond-expand forms.
-- Specifies that there are no more options. If there are more arguments after this, they are taken as script file name and its argu-
ments.
ENVIRONMENT
GAUCHE_LOAD_PATH
A colon separated list of the load paths.
The paths are appended before the system default load paths.
GAUCHE_DYNLOAD_PATH
A colon separated list of the load paths for dynamically loaded
objects. The paths are appended before the system default load paths.
AUTHORS
Shiro Kawai (shiro @ acm . org)
SEE ALSO
gauche-config(1)
Gauche Scheme script engine:
http://practical-scheme.net/gauche/
For the information about Scheme language, see
http://www.schemers.org/
Gauche 0.9.1 GOSH(1)