Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] Extract a pattern using sed or cut Post 302763851 by mukulverma2408 on Wednesday 30th of January 2013 02:33:38 PM
Old 01-30-2013
Thanks bipinajith,

That's what i was looking for... Smilie

Moderator's Comments:
Mod Comment edit by bakunin: changed thread title accordingly.

Last edited by bakunin; 01-30-2013 at 06:53 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help! Sed extract a pattern

I am trying to extract "securitySettings" out of line: <a ref ="http://localhost:5654/securitySettings"> using sed as follows: name = `grep "localhost" file.html | sed -n 's/.**\/\(.*)/\">/\1/p'` But it didn't run, seems have some syntax error. Do anybody knows why? Thank you very... (11 Replies)
Discussion started by: zhen
11 Replies

2. Shell Programming and Scripting

extract a string after a pattern using sed

I have a very large file and each line has a pattern and it is not position specific. I need to extract the string after the pattern ****MI* is the pattern in the red color 12 digit number is the sting value in the green color and it ends with ~ e.g. ... (1 Reply)
Discussion started by: gunaah
1 Replies

3. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

4. Shell Programming and Scripting

[solved] remove pattern with sed

Hi, i want to remove a certain pattern when i type pwd. pwd will look like this: ..../....../....../Pat_logs/..../....../...../...... the dotted lines are just random directory names, i want it to remove the "Pat_logs/...../....../....../" part so for example: ... (8 Replies)
Discussion started by: a27wang
8 Replies

5. UNIX for Dummies Questions & Answers

[Solved] deleting pattern based lines in sed

HI, My input file contains below data: DFHDR 12345110 1,200 2,-100 1,100 2,123 12345110 1,300 2,200 DFTLR In the above data, the first line and last lines should be remove as well as the lines in which contains 110 as position(6,7,8 position) should also be removed, How we... (0 Replies)
Discussion started by: pandeesh
0 Replies

6. Shell Programming and Scripting

[Solved] Find duplicate and add pattern in sed/awk

<Update> I have the solution: sed 's/\{3\}/&;&;---;4/' The thread can be marked as solved! </Update> Hi There, I'm working on a script processing some data from a website into cvs format. There is only one final problem left I can't find a solution. I've processed my file... (0 Replies)
Discussion started by: lolworlds
0 Replies

7. Shell Programming and Scripting

Search for a pattern,extract value(s) from next line, extract lines having those extracted value(s)

I have hundreds of files to process. In each file I need to look for a pattern then extract value(s) from next line and then search for value(s) selected from point (2) in the same file at a specific position. HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

8. Shell Programming and Scripting

sed or awk, cut, to extract specific data from line

Hi guys, I have been trying to do this, but... no luck so maybe you can help me. I have a line like this: Total Handled, Received, on queue Input Mgs: 140 / 14 => 0 I need to, get the number after the / until the =, to get only 14 . Any help is greatly appreciated. Thanks, (4 Replies)
Discussion started by: ocramas
4 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

10. Shell Programming and Scripting

Extract whole word preceding a specific character pattern with first occurence of the pattern

Hello. Here is a file contents : declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern =I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '=' Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
xmonad(1)							   xmonad manual							 xmonad(1)

Name
       xmonad - a tiling window manager

Description
       xmonad  is  a minimalist tiling window manager for X, written in Haskell.  Windows are managed using automatic layout algorithms, which can
       be dynamically reconfigured.  At any time windows are arranged so as to maximize the use of screen real estate.	All features of the window
       manager	are  accessible  purely from the keyboard: a mouse is entirely optional.  xmonad is configured in Haskell, and custom layout algo-
       rithms may be implemented by the user in config files.  A principle of xmonad is predictability: the user should know in advance  precisely
       the window arrangement that will result from any action.

       By  default,  xmonad  provides three layout algorithms: tall, wide and fullscreen.  In tall or wide mode, windows are tiled and arranged to
       prevent overlap and maximize screen use.  Sets of windows are grouped together on virtual screens, and each screen retains its own  layout,
       which may be reconfigured dynamically.  Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of
       screens.

       By utilizing the expressivity of a modern functional language with a rich static type system, xmonad provides a complete, featureful window
       manager	in  less  than	1200 lines of code, with an emphasis on correctness and robustness.  Internal properties of the window manager are
       checked using a combination of static guarantees provided by the type system, and type-based automated testing.	A benefit of this is  that
       the code is simple to understand, and easy to modify.

Usage
       xmonad  places  each  window  into a "workspace".  Each workspace can have any number of windows, which you can cycle though with mod-j and
       mod-k.  Windows are either displayed full screen, tiled horizontally, or tiled vertically.  You can toggle the layout mode with	mod-space,
       which will cycle through the available modes.

       You  can switch to workspace N with mod-N.  For example, to switch to workspace 5, you would press mod-5.  Similarly, you can move the cur-
       rent window to another workspace with mod-shift-N.

       When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible.  mod-{w,e,r} switch the focus between screens,
       while  shift-mod-{w,e,r}  move the current window to that screen.  When xmonad starts, workspace 1 is on screen 1, workspace 2 is on screen
       2, etc.	When switching workspaces to one that is already visible, the current and visible workspaces are swapped.

   Flags
       xmonad has several flags which you may pass to the executable.  These flags are:

       --recompile
	      Recompiles your configuration in ~/.xmonad/xmonad.hs

       --restart
	      Causes the currently running xmonad process to restart

       --replace
	      Replace the current window manager with xmonad

       --version
	      Display version of xmonad

       --verbose-version
	      Display detailed version of xmonad

   Default keyboard bindings
       mod-shift-return
	      Launch terminal

       mod-p  Launch dmenu

       mod-shift-p
	      Launch gmrun

       mod-shift-c
	      Close the focused window

       mod-space
	      Rotate through the available layout algorithms

       mod-shift-space
	      Reset the layouts on the current workspace to default

       mod-n  Resize viewed windows to the correct size

       mod-tab
	      Move focus to the next window

       mod-shift-tab
	      Move focus to the previous window

       mod-j  Move focus to the next window

       mod-k  Move focus to the previous window

       mod-m  Move focus to the master window

       mod-return
	      Swap the focused window and the master window

       mod-shift-j
	      Swap the focused window with the next window

       mod-shift-k
	      Swap the focused window with the previous window

       mod-h  Shrink the master area

       mod-l  Expand the master area

       mod-t  Push window back into tiling

       mod-comma
	      Increment the number of windows in the master area

       mod-period
	      Deincrement the number of windows in the master area

       mod-b  Toggle the status bar gap

       mod-shift-q
	      Quit xmonad

       mod-q  Restart xmonad

       mod-[1..9]
	      Switch to workspace N

       mod-shift-[1..9]
	      Move client to workspace N

       mod-{w,e,r}
	      Switch to physical/Xinerama screens 1, 2, or 3

       mod-shift-{w,e,r}
	      Move client to screen 1, 2, or 3

       mod-button1
	      Set the window to floating mode and move by dragging

       mod-button2
	      Raise the window to the top of the stack

       mod-button3
	      Set the window to floating mode and resize by dragging

Examples
       To use xmonad as your window manager add to your ~/.xinitrc file:

	      exec xmonad

Customization
       xmonad is customized in ~/.xmonad/xmonad.hs, and then restarting with mod-q.

       You can find many extensions to the core feature set in the xmonad- contrib  package,  available  through  your	package  manager  or  from
       xmonad.org (http://xmonad.org).

   Modular Configuration
       As  of  xmonad-0.9, any additional Haskell modules may be placed in ~/.xmonad/lib/ are available in GHC's searchpath.  Hierarchical modules
       are supported: for example, the file ~/.xmonad/lib/XMonad/Stack/MyAdditions.hs could contain:

	      module XMonad.Stack.MyAdditions (function1) where
		  function1 = error "function1: Not implemented yet!"

       Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib.

Bugs
       Probably.  If you find any, please report them to the bugtracker (http://code.google.com/p/xmonad/issues/list)

xmonad-0.10							   25 October 09							 xmonad(1)
All times are GMT -4. The time now is 12:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy