07-30-2009
THIS IS PRINTING AN ADDITIONAL THIRD LINE ...
first line
second
1,"wes",1,"ws"
1,"was",2,"qwa"
,,3,
i think it will work .. but can make me understand the logic ?
---------- Post updated at 06:01 AM ---------- Previous update was at 05:59 AM ----------
also the file i m using , i m not certain of the number of fields it will have ... i mean it is not necessarily 4 ...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which has some lines starting with a particular word. I would like to delete 5 lines before each such line containing that particular word.
eg:
line1
line2
line3
line4
line5
line6
"particular word"...
I would like to delete line2-line6 and all such occurences in that... (4 Replies)
Discussion started by: ramu_1980
4 Replies
2. UNIX for Dummies Questions & Answers
I'm looking to show specific lines (eg. 20 through 40) of a series of files in the directory. How do I do this? (2 Replies)
Discussion started by: hedgehog001
2 Replies
3. UNIX for Dummies Questions & Answers
I'm trying to figure out how to display a certain line in a text file. I keep getting references to Tail and Head, and I know how these work, but i'm lost on how to find say the third out of the five lines and display only that.
I thought maybe grep could help, but that doesn't seem likely.
... (3 Replies)
Discussion started by: MaestroRage
3 Replies
4. UNIX for Dummies Questions & Answers
are there any basic commands that can display lines 99 - 101 of the /etc/passwd file?
I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies
5. Shell Programming and Scripting
Hello All,
I am new to this forum. I am currently facing a problem in manipulating files.
I have two files called old-matter and new-matter
# cat old-matter
abc: this, is a, sample, entry
byi: white board, is white in color
rtz: black, board is black
qty: i tried, a lot
asd: no... (1 Reply)
Discussion started by: rahmathulla
1 Replies
6. Shell Programming and Scripting
Hi
this script adds text in the correct place on one line only, in a script.
awk 'BEGIN{
printf "Enter residue and chain information: "
getline var < "-"
split(var,a)
}
/-s rec:/{$7=a; }
{print}' FLXDOCK
but I need the same info added at position 7 on line 34 and... (1 Reply)
Discussion started by: gav2251
1 Replies
7. Solaris
Hi,
I have a small piece of Makefile script which throw's error on Sun Sparc machine, but works fine with Sun Optron, Linux, AIX machines.
FOO=Naveen
test1:FOO=Dhilip
test1:
@echo FOO is ${FOO}
test2:
@echo Me is ${FOO}
Output on Sun Sparc -
ukhml-v890new-~/test: make test1... (5 Replies)
Discussion started by: nsriram
5 Replies
8. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
9. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
10. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies
LEARN ABOUT OPENSOLARIS
el
el(1) General Commands Manual el(1)
NAME
el -- program to make a tuned shell-command for Oneliner
SYNOPSIS
el [-acdfhioxV] [--command cmd] [--args n] [--format fmt] [--execute] [--inpipe buf] [--outpipe buf] [--serial] [--help] [--ver-
sion] [--debug]
DESCRIPTION
This manual page documents briefly the el command.
This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has docu-
mentation in the GNU Info format; see below.
el is a program that You can make a tuned shell-command for Oneliner with. This command can send S-exp to Emacs, and this can make Emacs
evaluate it, too. In other words, you can execute Emacs's function from shell-commands. And you can make Emacs work in closer cooperation
with your favorite shell-commands.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below. For a complete description, see the Info files.
-c cmd --command cmd
cmd means a function of Elisp. Command line arguments and data from stdin means arguments of cmd. If you specify the only -c
switch, el output one S-exp by one line of stdin.
--a n --args n
Specifies the maximum number of arguments of a Elisp function with -c switch.
-f fmt --format fmt
Allows you to use format string of printf for making a S-exp.
-x --execute
Requests to Oneliner to evaluate the S-exp to use *Oneliner auto-eval* buffer.
-i buf --inpipe buf
Gets input from pipe-buffer. You can specify a number of pipe-buffer, too.
-o buf --outpipe buf
Puts output to pipe-buffer. You can specify a number of pipe-buffer, too.
-s --serial
Makes el to serialize multiple lines to one line.
-h --help
Display help message.
-V --version
Display version identifiers.
-d --debug
Enable debugging state.
SEE ALSO
The programs are documented fully by Oneliner(Shell-mode hooks for Oneliners) available via the Info system.
AUTHOR
This manual page was written by OHURA Makoto <ohura@debian.org> for the Debian system (but may be used by others). Permission is granted
to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by
the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
el(1)