Sponsored Content
Top Forums Shell Programming and Scripting Capture the value between brackets Post 302915595 by samsan on Thursday 4th of September 2014 01:52:33 AM
Old 09-04-2014
Capture the value between brackets

Hi
I am having hard time getting this right and need some help. I Have 3 files, and everyone contains the following:-

File1
Code:
Today, we have  Name(Jack)     Age(19)    Class (A2)
 Today, we have Name(Kim) Class (G9)

File2
Code:
Today, we have  Name(Lee)     Age(19)    Class (A2)
Today, we have Name(Nile)     Age (45)   Class (4R)
Today, we have Name(Kim) Class (G9)   Class (4R)

File3
Code:
Today, In Class (4T) we have  Name(Nick)     Age(19)   
Today, In Class (4Y) we have  Name(Sara)     Age(14) 
Today, In Class (4Y) we have  Name(Nile)     Age (45) 
Today, In Class (4Y) we have  Name(Jack)     Age(19)

I need to capture the value between brackets after Name only, but I don't want the name to be print twice.

So ,I am looking for output like this :-

Code:
Jack
Kim
Lee
Nile
Nick
Sara

Thank you

Last edited by Scrutinizer; 09-04-2014 at 03:23 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Angle brackets

From the Apache thread in the Adanced forum: Thats because your browser interprets anything within angle brackets to be an HTML tag. You need to quote these brackets if you want them to appear correctly. The proper quotes are: &amp;lt; for < and &amp;gt; for > So, for example, you would have... (1 Reply)
Discussion started by: PxT
1 Replies

2. UNIX for Dummies Questions & Answers

square brackets

I would like to substitute a phrase which contains square brackets. change TO how? Thanks (2 Replies)
Discussion started by: gilead29
2 Replies

3. Shell Programming and Scripting

how do you use brackets ?? in a script.

:D i am pretty much new to scripting and don't want to pick up bad habits so I am trying to get myself to use brackets in my scripts since I plan on using them alot.. ! in this example of a script I wrote I can not figure out where the brackets go can anyone give me some insight into the use of... (3 Replies)
Discussion started by: moxxx68
3 Replies

4. UNIX for Dummies Questions & Answers

usage of brackets for if

Hi, I would like to know about the usage of brackets to negate a set of boolean evaluations an equivalent to what i am trying is below if or || ] ] then echo"valid time of day" else echo "invalid input" exit fi the bracket structue as mentioned doesnt work .. i am using ksh.... (4 Replies)
Discussion started by: lakshmikanth
4 Replies

5. Shell Programming and Scripting

help to delete brackets [ ]

hi all, i want to delete brackets in all the file and to keep the string or data between them ( example Q --> Qxxx) with sed command.. thanks (4 Replies)
Discussion started by: kamel.seg
4 Replies

6. Shell Programming and Scripting

Get value between brackets

Hi I am having hard time getting this right and need some help. I Have several log files, and everyone contains the following 3 lines at the end: 4 ETW000 Disconnected from database. 4 ETW000 End of Transport (0000). 4 ETW000 date&time: 13.01.2011 - 08:03:28 I need to capture the value... (7 Replies)
Discussion started by: nimo
7 Replies

7. Shell Programming and Scripting

How to get the value in the first brackets

Hello, I am trying to write a script using ksh. And I want to get the value within the first brackets of a string. For example: 14/04/11 11:35: 00 This is (nn) from the earth. Then i hope to get nn in this case. Can any one advise me how to implement it? Thank you very much! nn (2 Replies)
Discussion started by: n_n
2 Replies

8. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

9. Shell Programming and Scripting

adding brackets

Hi, If you suppose that you have two columns of numbers, and I want to merge these two columns into one and put a bracket around it. and perphaps add a dash between two numbers. input.txt 1 2 3 4 5 6 7 8 output.txt (1-2) (3-4) (5-6) (7-8) Thanks in advance! Please use... (2 Replies)
Discussion started by: johnkim0806
2 Replies

10. Shell Programming and Scripting

Brackets

Hi all. i need a small help. i have written an exit code, which will check whether mo.sh is successful or not. if the status is >0 it will exit the shell. 1>Do you guys think it is a correct way to write? 2>what if i change the double bracket to single. how will it change the o/p. ... (1 Reply)
Discussion started by: sub
1 Replies
SHUTTER(1)						User Contributed Perl Documentation						SHUTTER(1)

NAME
Shutter - Feature-rich Screenshot Tool SYNOPSIS
shutter [options] COPYRIGHT
Shutter is Copyright (C) by Mario Kemper and Shutter Team DESCRIPTION
Shutter is a feature-rich screenshot program. You can take a screenshot of a specific area, window, your whole screen, or even of a website - apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window. OPTIONS
Example 1 shutter -a -p=myprofile --min_at_startup Example 2 shutter -s=100,100,300,300 -e Example 3 shutter --window=.*firefox.* Example 4 shutter --web=http://shutter-project.org/ -e CAPTURE MODE OPTIONS -s, --select=[X,Y,WIDTH,HEIGHT] Capture an area of the screen. Providing X,Y,WIDTH,HEIGHT is optional. -f, --full Capture the entire screen. -w, --window=[NAME_PATTERN] Select a window to capture. Providing a NAME_PATTERN (Perl-style regex) ist optional. -a, --active Capture the current active window. --section Capture a section. You will be able to select any child window by moving the mouse over it. -m, --menu Capture a menu. -t, --tooltip Capture a tooltip. --web=[URL] Capture a webpage. Providing an URL ist optional. -r, --redo Redo last screenshot. SETTINGS OPTIONS -p, --profile=NAME Load a specific profile on startup. -o, --output=FILENAME Specify a filename to save the screenshot to (overwrites any profile-related setting). Supported image formats: You can save to any popular image format (e.g. jpeg, png, gif, bmp). Additionally it is possible to save to pdf, ps or svg. Please note: There are several wildcards available, like %Y = year %m = month %d = day %T = time $w = width $h = height $name = multi-purpose (e.g. window title) $nb_name = like $name but without blanks in resulting strings $profile = name of current profile $R = random char (e.g. $RRRR = ag4r) %NN = counter The string is interpretted by strftime. See "man strftime" for more examples. As an example: shutter -f -e -o './%y-%m-%d_$w_$h.png' would create a file named '11-10-28_1280_800.png' in the current directory. -d, --delay=SECONDS Wait n seconds before taking a screenshot. -c, --include_cursor Include cursor when taking a screenshot. -C, --remove_cursor Remove cursor when taking a screenshot. APPLICATION OPTIONS -h, --help Prints a brief help message and exits. -v, --version Prints version information. -d, --debug Prints a lot of debugging information to STDOUT. --clear_cache Clears cache, e.g. installed plugins, at startup. --min_at_startup Starts Shutter minimized to tray. --disable_systray Disables systray icon. -e, --exit_after_capture Exit after the first capture has been made. This is useful when using Shutter in scripts. -n, --no_session Do not add the screenshot to the session. This is useful when using Shutter in scripts. BUG REPORTS
If you find a bug in Shutter, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of Shutter. The latest version is always available from: https://launchpad.net/shutter Once you have determined that a bug actually exists, please report it at launchpad: https://bugs.launchpad.net/shutter/+filebug perl v5.14.2 2012-04-11 SHUTTER(1)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy