Sponsored Content
Top Forums Shell Programming and Scripting sed search could not be complete Post 302940660 by manas_ranjan on Wednesday 8th of April 2015 06:52:28 AM
Old 04-08-2015
sed search could not be complete

Hi All,

I have a parameter as below

Code:
make_target_dir_name="/buildanddeploy/BUILDS/build.22/db/Db-1.17.9/SQL"

Now after writting sed I want only the output should display SQL by ripping /buildanddeploy/BUILDS/build.22/db/Db-1.17.9/ out from the input make_target_dir_name

my sed is not working

Code:
echo $make_target_dir_name | sed "s_.*Db-*[0-9]\+__")

--> Not working showing me
Code:
.17.9/SQL

How can I achieve this? this should dynamically take all the numbers out and show me only folders after the number.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search using sed

May i know how to perform a search using sed? For example, a user enter a string, and i need to search it in a file details.dat to verify it. And additional how to create a auto-generate number? And it can be increment each time a record added? (1 Reply)
Discussion started by: Ohji
1 Replies

2. Shell Programming and Scripting

Search and replace sed or tr

Hi folks, I need to search and replace specific text in a file and replace it. I have a text file that does not have any newlines or carriage returns. All newlines have been removed. Here is what I need to do. Find the exact string “DH” (quotes included) and replace it with \n”DH” (basically... (6 Replies)
Discussion started by: bridgeje
6 Replies

3. UNIX for Dummies Questions & Answers

Search/Replace with Sed

Is there a way to use the sed command to 1) search a specified pattern 2) in the line where that pattern is found, replace from character N to character N+4 with a new 4-character string. Thks in advance! (5 Replies)
Discussion started by: mvalonso
5 Replies

4. Shell Programming and Scripting

Can SED Search By Column?

Hi all, I am trying to search for a keyword in the fourth column of a massive carrot(^) delimited file and unfortunately I cannot use AWK (which would have been ideal). Can SED (or maybe even GREP) perform a search like this? (12 Replies)
Discussion started by: Korn0474
12 Replies

5. UNIX for Dummies Questions & Answers

BASH complete-filename & menu-complete together

Hi, Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab? Right now this is what I have in my .bashrc: bind "set show-all-if-ambiguous on" bind \\C-o:menu-complete This allows... (0 Replies)
Discussion started by: Mithu
0 Replies

6. UNIX for Dummies Questions & Answers

SED: Can't Repeat Search Character in SED Output

I'm not sure if the problem I'm seeing is an artifact of sed or simply a beginner's mistake. Here's the problem: I want to add a zero-width space following each underscore between XML tags. For example, if I had the following xml: <MY_BIG_TAG>This_is_a_test</MY_BIG_TAG> It should look like... (8 Replies)
Discussion started by: rhetoric101
8 Replies

7. Shell Programming and Scripting

sed help - search/copy from one file and search/paste to another

I am a newbie and would like some help with the following - Trying to search fileA for a string similar to - AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3 I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
5 Replies

8. Shell Programming and Scripting

sed search and wc

I have a file of the following >!#jjdjahfjdhfjkds aklsjdlkasdkashfjkdshfkjdsbfnbsdkjnfbdsk >*kfjhdsafjdshjfkhdsjkfhdsk wuyruiewyrieyueytireuytreyu >-jdfhsjsjkdhfd xzmncxzbvnmcxbvbcxn I would like to do a wc for the lines starting with > For the above example, the result is 3. ... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

9. Shell Programming and Scripting

Grep command is not search the complete pattern

I am facing a problem while using the grep command in shell script. Actually I have one file (PCF_STARHUB_20130625_1) which contain below records. SH_5.55916.00.00.100029_20130601_0001_NUC.csv.gz|438|3556691115 SH_5.55916.00.00.100029_20130601_0001_Summary.csv.gz|275|3919504621 ... (2 Replies)
Discussion started by: sumit.vedi1988
2 Replies

10. UNIX for Beginners Questions & Answers

sed search

Hello, I know how to use sed for simple search but i need to search something like below in a file. From the below string, i need to find and replace only ./ with a $ using sed. ./abcd/str.xyz Thanks in advance KK (8 Replies)
Discussion started by: Pavan Kumar19
8 Replies
XmScrollVisible(3X)													       XmScrollVisible(3X)

NAME
XmScrollVisible - A ScrolledWindow function that makes an invisible descendant of a ScrolledWindow work area visible SYNOPSIS
#include <Xm/ScrolledW.h> void XmScrollVisible (scrollw_widget, widget, left_right_margin, top_bottom_margin) Widget scrollw_widget; Widget widget; Dimension left_right_margin; Dimension top_bottom_margin; DESCRIPTION
XmScrollVisible makes an obscured or partially obscured widget or gadget descendant of a ScrolledWindow work area visible. The function repositions the work area and sets the specified margins between the widget and the nearest viewport boundary. The widget's location rela- tive to the viewport determines whether one or both of the margins must be adjusted. This function requires that the XmNscrollingPolicy of the ScrolledWindow widget be set to XmAUTOMATIC. Specifies the ID of the ScrolledWindow widget whose work area window contains an obscured descendant. Specifies the ID of the widget to be made visible. Specifies the margin to establish between the left or right edge of the widget and the associated edge of the viewport. This margin is established only if the widget must be moved horizontally to make it visi- ble. Specifies the margin to establish between the top or bottom edge of the widget and the associated edge of the viewport. This margin is established only if the widget must be moved vertically to make it visible. For a complete definition of ScrolledWindow and its associated resources, see XmScrolledWindow(3X). SEE ALSO
XmScrolledWindow(3X) XmScrollVisible(3X)
All times are GMT -4. The time now is 12:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy