Sponsored Content
Top Forums Shell Programming and Scripting Extracting data based on the list file Post 302445827 by shtobias on Tuesday 17th of August 2010 03:17:51 AM
Old 08-17-2010
Hi pravin,

Thanks, it is working indeed. Appreciate if you explain what this awk line does?


regards
Sherwin

---------- Post updated at 03:17 PM ---------- Previous update was at 02:59 PM ----------

Hi Jaduks,

Yes your script is working as well, fedora 10 has problem running this so i switch to RHEL instead, and now it working.

Can you shed light as well at what does your script actually does? Thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting data from text file based on configuration set in config file

Hi , a:) i have configuration file with pattren <Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output> eg: myfile.confg 9899000000,9899999999,DATA,b.dat 9899000000,9899999999,SMS,a.dat b:) Stucture of my data file is... (3 Replies)
Discussion started by: suparnbector
3 Replies

2. Shell Programming and Scripting

Extracting lines in file based on time

Hi, anyone has any ideas on how do we extract lines from a file with format similiar to this: (based on current time) Jun 18 00:16:50 .......... ............. ............ Jun 18 00:17:59 .......... ............. ............ Jun 18 01:17:20 .......... ............. ............ Jun 18... (5 Replies)
Discussion started by: faelric
5 Replies

3. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

4. Shell Programming and Scripting

Extracting data between tags based on search string from unix file

Input file is on Linux box and the input file has data in just one line with 1699741696 characters. Sample Input: <xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Discussion started by: gaya
5 Replies

5. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

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

6. Shell Programming and Scripting

extracting lines based on condition and copy to another file

hi i have an input file that contains some thing like this aaa acc aa abc1 1232 aaa abc2.... poo awq aa abc1 aaa aaa abc2 bbb bcc bb abc1 3214 bbb abc3.... bab bbc bz abc1 3214 bbb abc3.... vvv ssa as abc1 o09 aaa abc4.... azx aaq aa abc1 900 aqq abc19.... aaa aa aaaa abc1 899 aa... (8 Replies)
Discussion started by: anurupa777
8 Replies

7. Shell Programming and Scripting

Generate tabular data based on a column value from an existing data file

Hi, I have a data file with : 01/28/2012,1,1,98995 01/28/2012,1,2,7195 01/29/2012,1,1,98995 01/29/2012,1,2,7195 01/30/2012,1,1,98896 01/30/2012,1,2,7083 01/31/2012,1,1,98896 01/31/2012,1,2,7083 02/01/2012,1,1,98896 02/01/2012,1,2,7083 02/02/2012,1,1,98899 02/02/2012,1,2,7083 I... (1 Reply)
Discussion started by: himanish
1 Replies

8. Shell Programming and Scripting

Script for extracting data from csv file based on column values.

Hi all, I am new to shell script.I need your help to write a shell script. I need to write a shell script to extract data from a .csv file where columns are ',' separated. The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (3 Replies)
Discussion started by: Vivekit82
3 Replies

9. UNIX for Dummies Questions & Answers

Extracting data from one file, based on another file (splitting)

Dear All, I have two files but want to extract data from one based on another... can you please help me file 1 David Tom Ellen and file 2 David|0010|testnamez|resultsz David|0004|testnamex|resultsx Tom|0010|testnamez|resultsz Tom|0004|testnamex|resultsx Ellen|0010|testnamez|resultsz... (12 Replies)
Discussion started by: A-V
12 Replies

10. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
JED(1)								   User Manuals 							    JED(1)

NAME
Jed - programmers editor SYNOPSIS
jed --version jed-script --version xjed --version jed [--secure] [--batch|--script|--help] [options] file ... jed-script [--secure] script file [script options] ... xjed [--secure] [X options] [--batch|--script|--help] [options] file ... DESCRIPTION
Jed - programmers editor Features: Color syntax highlighting. Emulation of Emacs, EDT, Wordstar, and Brief editors. Extensible in a language resembling C. Completely cus- tomizable. Editing TeX files with AUC-TeX style editing (BiBTeX support too). Folding support, and much more... For complete documentation, see GNU info files, this manual only provides brief tutorial. OPTIONS
major options --version prints the version and compiletime variables. --help prints usage information. --secure runs Jed in secure mode, e.g. you can't run any external commands with system() or run_shell_cmd(). --batch run Jed in batch mode. This is a non-interactive mode. --script this is a mode like --batch but jed does not eval the startup files. It behaves like slsh. You must give the file that should be evaluated as second argument. It's the same as calling jed-script. minor options -n do not load .jedrc file. -a 'file' load file as user configuration file instead of .jedrc. + 'n' goto line n in buffer (notice that in order to this option to take effect, if must appear before the file name in the command line, like 'jed +3 file') -g 'n' goto line n in buffer (notice that in order to this option to take effect, if must appear after the file name in the command line, like 'jed file -g 3') -l 'file' load file as S-Lang code. -f 'function' execute S-Lang function named function -s 'string' search forward for string -2 split window -i 'file' insert file into current buffer. X options xjed accapts the common options like -display, -name, -fn and -geometry. Additionaly it accepts -facesize SIZE, -fs SIZE if build with XRENDERFONT support, selects the font size SIZE. Use it with the option -fn to select a scalable font. -foreground COLOR, -fg COLOR sets the foreground color. -background COLOR, -bg COLOR sets the background color. -fgMouse COLOR, -mfg COLOR sets the foreground color of the mouse pointer. -bgMouse COLOR, -mbg COLOR sets the background color of the mouse pointer. -Iconic, -ic start iconified. -title NAME sets the window title to NAME. For more options look at xterm.c. CONFIGURATION
Emulating Other Editors JED's ability to create new functions using the S-Lang programming language as well as allowing the user to choose key bindings, makes the emulation of other editors possible. Currently, JED provides reasonable emulation of the Emacs, EDT, and Wordstar editors. Emacs Emulation Emacs Emulation is provided by the S-Lang code in emacs.sl. The basic functionality of Emacs is emulated; most Emacs users should have no problem with JED. To enable Emacs emulation in JED, make sure that the line: () = evalfile ("emacs"); is in your jed.rc (.jedrc) startup file. JED is distributed with this line already present in the default jed.rc file. EDT Emulation For EDT emulation, edt.sl must be loaded. This is accomplished by ensuring that the line: () = evalfile ("edt"); is in present in the jed.rc (.jedrc) Startup File. Wordstar Emulation wordstar.sl contains the S-Lang code for JED's Wordstar emulation. Adding the line () = evalfile ("wordstar"); to your jed.rc (.jedrc) startup file will enable JED's Wordstar emulation. RUN TIME
Status line and Windows JED supports multiple windows. Each window may contain the same buffer or different buffers. A status line is displayed immediately below each window. The status line contains information such as the JED version number, the buffer name, mode, etc. Please beware of the fol- lowing indicators: ** buffer has been modified since last save. %% buffer is read only. m Mark set indicator. This means a region is being defined. d File changed on disk indicator. This indicates that the file associated with the buffer is newer than the buffer itself. s spot pushed indicator. + Undo is enabled for the buffer. [Narrow] Buffer is narrowed to a region of LINES. [Macro] A macro is being defined. Mini-Buffer. The Mini-Buffer consists of a single line located at the bottom of the screen. Much of the dialog between the user and JED takes place in this buffer. For example, when you search for a string, JED will prompt you for the string in the Mini-Buffer. The Mini-Buffer also provides a direct link to the S-Lang interpreter. To access the interpreter, press Ctrl-X Esc and the S-Lang> prompt will appear in the Mini-Buffer. Enter any valid S-Lang expression for evaluation by the interpreter. It is possible to recall data previously entered into the Mini-Buffer by using the up and down arrow keys. This makes it possible to use and edit previous expressions in a convenient and efficient manner. Basic Editing Editing with JED is pretty easy - most keys simply insert themselves. Movement around the buffer is usually done using the arrow keys or page up and page down keys. If edt.sl is loaded, the keypads on VTxxx terminals function as well. Here, only the highlights are touched upon (cut/paste operations are not considered `highlights'). In the following, any character prefixed by the ^ character denotes a Control character. On keyboards without an explicit Escape key, Ctrl-[ will most likely generate and Escape character. A prefix argument to a command may be generated by first hitting the Esc key, then entering the number followed by pressing the desired key. Normally, the prefix argument is used simply for repetition. For example, to move to the right 40 characters, one would press Esc 4 0 followed immediately by the right arrow key. This illustrates the use of the repeat argument for repetition. However, the prefix argu- ment may be used in other ways as well. For example, to begin defining a region, one would press the Ctrl-@ key. This sets the mark and begins highlighting. Pressing the Ctrl-@ key with a prefix argument will abort the act of defining the region and to pop the mark. The following list of useful keybindings assumes that emacs.sl has been loaded. Ctrl-L Redraw screen. Ctrl-_ Undo (Control-underscore, also Ctrl-X u'). Esc q Reformat paragraph (wrap mode). Used with a prefix argument. will justify the paragraph as well. Esc n narrow paragraph (wrap mode). Used with a prefix argument will justify the paragraph as well. Esc ; Make Language comment (Fortran and C) Esc Trim whitespace around point Esc ! Execute shell command Esc $ Ispell word Ctrl-X ? Show line/column information. ` quoted_insert --- insert next char as is (backquote key) Esc s Center line. Esc u Upcase word. Esc d Downcase word. Esc c Capitalize word. Esc x Get M-x minibuffer prompt with command completion Ctrl-X Ctrl-B pop up a list of buffers Ctrl-X Ctrl-C exit JED Ctrl-X 0 Delete Current Window Ctrl-X 1 One Window. Ctrl-X 2 Split Window. Ctrl-X o Other window. Ctrl-X b switch to buffer Ctrl-X k kill buffer Ctrl-X s save some buffers Ctrl-X Esc Get "S-Lang>" prompt for interface to the S-Lang interpreter. Esc . Find tag Ctrl-@ Set Mark (Begin defining a region). Used with a prefix argument aborts the act of defining the region and pops the Mark. FILES
JED_ROOT/lib/*.sl these are the default runtime jed slang files (packages like jed-extra can define additional slang library directories) JED_ROOT/lib/site.sl This is the default startup file. /etc/jed.d/*.sl The system wide configuration files (this is a special Debian feature). ~/.jedrc Per user configuration file, or ~/.jed/jed.rc per user configuration file if the Jed_Home_Directory ~/.jed/ exists. AUTHOR
John E. Davis <davis@space.mit.edu> Jed's Author --- This document was translated to nroff by "Boris D. Beletsky" <borik@isracom.co.il> Debian OCT 1996 JED(1)
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy