Sponsored Content
Top Forums Shell Programming and Scripting sed with complicated variable pattern Post 302529683 by pravintse on Friday 10th of June 2011 03:56:24 AM
Old 06-10-2011
Great. yes michael. It worked, my issue was getting value from environments variable svar4.
Thank you very much.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in sed command ( Replacing a pattern inside a file with a variable value )

Hello, The following sed command is giving error sed: -e expression #1, char 13: unknown option to `s' The sed command is echo "//-----" | sed "s/\/\/---*/$parChk/g" where parChk="//---ee-" How can i print the variable value from sed command ? And is it possible to replace a... (2 Replies)
Discussion started by: frozensmilz
2 Replies

2. Shell Programming and Scripting

assigning complicated input to a variable

I cannot seem to correctly assign this line of code to a variable: HITS=`pwd`/csv/LightningProbability30minAlignmentErrorTable_*.csv | sed 's/,/ /g' | awk '{print int(100*$5)}' | wc This does not work. I tried surrounding it in backticks, but I think the backticks in `pwd` is messing it... (10 Replies)
Discussion started by: sigtor77
10 Replies

3. Emergency UNIX and Linux Support

Complicated SED search required

Hi All, I'm trying to extract all the description fields from a MIB file which contain multiple instances of the following text: ENTERPRISE compaq VARIABLES { sysName, cpqHoTrapFlags, cpqSsBoxCntlrHwLocation, cpqSsBoxCntlrIndex, cpqSsBoxBusIndex,... (10 Replies)
Discussion started by: badoshi
10 Replies

4. Shell Programming and Scripting

Parsing complicated CSV file with sed

Yes, there is a great doc out there that discusses parsing csv files with sed, and this topic has been covered before but not enough to answer my question (unix.com forums). I'm trying to parse a CSV file that has optional quotes like the following: "Apple","Apples, are fun",3.60,4.4,"I... (3 Replies)
Discussion started by: analog999
3 Replies

5. UNIX for Advanced & Expert Users

complicated date stamp pattern

Hi, I have a log file which contains lines like below: 2010-07-19 07:13:19,021 ERROR system ...(text) 2010-07-19 07:22:03,427 ERROR system ...(text) class com... (text) 2010-07-19 07:23:19,026 ERROR system ...(text) class com... (text) each line is a separate line... I am given the a... (11 Replies)
Discussion started by: a27wang
11 Replies

6. Shell Programming and Scripting

Pattern match exclusive return pattern/variable

I have an application(Minecraft Server) that generates a logfile live. Using Crontab and screen I send a 'list' command every minute. Sample Log view: 2013-06-07 19:14:37 <Willrocksyea1> hello* 2013-06-07 19:14:41 <Gromden29> hey 2013-06-07 19:14:42 Gromden29 lost connection:... (1 Reply)
Discussion started by: gatekeeper258
1 Replies

7. Shell Programming and Scripting

Regex in sed to find specific pattern and assign to variable

(5 Replies)
Discussion started by: radioactive9
5 Replies

8. 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

9. Shell Programming and Scripting

How to delete all lines before a particular pattern when the pattern is defined in a variable?

I have a file Line 1 a Line 22 Line 33 Line 1 b Line 22 Line 1 c Line 4 Line 5 I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output. ... (21 Replies)
Discussion started by: Soham
21 Replies

10. Shell Programming and Scripting

sed with pattern using variable

Dear Community; I have a long xml file (100k+ lines) with patterns like below: <OfferDefinition Id="123"> <Type>Timer</Type> <Description>Test Text1</Description> <MajorPriority>95</MajorPriority> <SelectableInPolicy>0</SelectableInPolicy> ... (10 Replies)
Discussion started by: mystition
10 Replies
GHI(1)							      General Commands Manual							    GHI(1)

NAME
ghi - command-line interface to the GitHub Issues API SYNOPSIS
ghi command [arguments] [options] DESCRIPTION
This manual page documents briefly the ghi command. ghi is a command-line interface to the GitHub Issues API. It can be used to access all of GitHub's documented Issues API (v2) functionality from the command line: open, close and manipulate issues. If no command is given, the default action is list. If a number is given instead, the default action is show. COMMANDS
list [ -s open|closed|all ] Show open, closed or all issues (choose with -s, see below). Default is open. show number Show issue number. This command can be invoked also as ghi <number>. open [ number ], o [ number ] Create a new issue, and launch $EDITOR. If number is given, reopens that issue. open -m message, o -m message Create a new issue with message content (optionally, use for new lines; first line will be the issue title). close number, c number Closes issue number. edit number, e number Edit issue number with $EDITOR. label add|remove label number Add or remove label to/from issue number. You can use al or rl instead of, respectively, label add and label remove. search term, s term Search for term. comment number, m number Create a comment for issue number (with $EDITOR). OPTIONS
-h, --help Show summary of options. -v, --verbose Show issue details (only for show, list and search commands). Default is false. -V, --version Show program's version number and exit. -s STATE, --state=STATE Specify state (only for list and search (except "all") commands). Choices are: open (o), closed (c), all (a). Default is open. -r REPO, --repo=REPO, --repository=REPO Specify a repository. The format: "user/repo" or just "repo" (latter will get the user from the global git config). -w, --web, --webbrowser Show issue(s) GitHub page in web browser (only for list and show commands). Default is false. AUTHOR
github-cli was written by Sander Smits <jhmsmits@gmail.com>. This manual page was written by David Paleino <dapal@debian.org>, for the Debian project (and may be used by others). April 13, 2010 GHI(1)
All times are GMT -4. The time now is 02:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy