Sponsored Content
Top Forums Shell Programming and Scripting Grep with wildcard in middle of word Post 302281362 by cfajohnson on Wednesday 28th of January 2009 06:22:58 PM
Old 01-28-2009
Quote:
Originally Posted by danmauer
How can
grep G.*schema

give me the result: ${Gacntg_dt}""'"'
doesn't G.*schema say give me an unlimited number of characters between G and schema?

Grep uses regular expressions, not wildcards.

In a regular expression, * stands for 0 or more of the preceding character; a dot is matched by any character.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

add a word in the middle

I have a file where in I need to add gctunit1/gtdivcompebb1/ after the = sign for example: gtfix31/gctunit_gtdivcompebb1/csclkswcompbypassstepgnnnh = gctunit1/gtdivcompebb1/csclkswcompbypassstepgnnnh (3 Replies)
Discussion started by: pitagi
3 Replies

2. UNIX for Dummies Questions & Answers

Is it possible to grep with a newline in the middle of an expression?

I'm hoping that there is a way to do this. I'm sure I won't be able to get the answer I need on the deadline I need it...but at least I'll learn how to solve this problem. I have a file that looks like this: (00:14:25\$ head -27 QNHDSPACEDVR Name: PollDhctAVFSInfo 00:0F:21:4B:00:6A Name:... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

3. UNIX for Dummies Questions & Answers

printing only the middle word between two patterns

How would I print the word "and" between the words "FOO" and BAR" using sed? My file has three words in it FOO and BAR. I only want the word "and". Thanks every one. (7 Replies)
Discussion started by: tigta09
7 Replies

4. Shell Programming and Scripting

grep middle word between two patterns

Hi, I'm currently working on a shell script to automate a backup check on oracle database. My requirement is to grep the words between two delimiters and pass on to a variable.. for ex I have following values in my log file... (DB_NAME), (163.24 25), (16/02/10 23:40), (COMPLETED), I want... (5 Replies)
Discussion started by: senthil3d
5 Replies

5. Shell Programming and Scripting

Find zipcode with Grep with optional space in middle

Hello everyone. I am new to unix, nice to meet you all. I have a small problem with a question. I have to write a command that finds all the postal codes in a txt file. All postal codes will begin on its own line in the txt file. This is the formal of postal code: "A#A#A#" or "A#A #A#" A... (3 Replies)
Discussion started by: leonmerc
3 Replies

6. Shell Programming and Scripting

wildcard inside regular expression for grep

Hi, I'm on a Linux machine with a bash shell. I have some apache logs from where I want to extract the lines that match this pattern : "GET /dir1/dir2/dir3/bt_sx.gif HTTP/1.1" but where "/dir1/dir2/dir3/bt_sx" may vary , so I would like to grep something like cat apache.log | grep "\"GET... (2 Replies)
Discussion started by: black_fender
2 Replies

7. Shell Programming and Scripting

Grep Wildcard search

How can i grep for a pattern with wildcard using grep? I want to identify all the lines that start with SAM and end in .PIPE IN.TXT SAM_HEADER.PIPE SAM_DETAIL.PIPE SAM_INVOICE.PIPE Can i do something like grep SAM*.PIPE IN.TXT (2 Replies)
Discussion started by: venky338
2 Replies

8. Shell Programming and Scripting

Wildcard for grep

GNU grep with Oracle Linux 6.3 I want to grep for strings starting with the pattern ora and and having the words r2j in it. It should return the lines highlighted in red below. But , I think I am not using wildcard for multiple characters correctly. $ cat someText.txt ora_pmon_jcpprdvp1... (3 Replies)
Discussion started by: kraljic
3 Replies

9. Shell Programming and Scripting

Grep with wildcard

hi anyone how can use grep with wildcard. for example grep "sample?txt" filename doesn't show sample1txt or grep "sample*txt" filename doesn't show sample123.txt that there is in filename. many thanks samad (12 Replies)
Discussion started by: abdossamad2003
12 Replies

10. Shell Programming and Scripting

Unable to grep using wildcard in a file.

I wish to check if my file has a line that does not start with '#' and has 1. Listen and 2. 443 echo "Listen 443" > test.out grep 'Listen *443' test.out | grep -v '#' Listen 443 The above worked fine but when the entry changes to the below the grep fails... (2 Replies)
Discussion started by: mohtashims
2 Replies
GSETTINGS-SCHEMA-C(1)						   User Commands					     GSETTINGS-SCHEMA-C(1)

NAME
gsettings-schema-convert - GConf to GSettings schema conversion SYNOPSIS
gsettings-schema-convert [option...] {file} DESCRIPTION
gsettings-schema-convert converts between GConf and GSettings schema file formats. Note that the conversion is not expected to be fully automated. You are expected to verify and edit the result of the conversion. Note that GSettings schemas need to be converted into binary form with glib-compile-schemas before they can be used by applications. Options -h, --help Print help and exit -o OUTPUT, --output=OUTPUT Store the generated output in the file OUTPUT. If no output file is specified, the generated output is written to stdout. -f, --force Overwrite the output file if it already exists. -g, --gconf The input file is a GConf schema. -s, --simple Produce a GSettings schema in simple format. The simple format is easier to edit and can be converted into the XML format with gsettings-schema-convert later on. -x, --xml Produce a GSettings schema in XML format. If the output format is not explicitly specified, this is the default. -i ID, --schema-id=ID Use ID as the schema id in the generated GSettings schema. -d DOMAIN, --gettext-domain=DOMAIN Use DOMAIN as the gettext domain in the generated GSettings schema. -u, --keep-underscores Keep underscores in key names instead of replacing them with dashes. GSettings keys should not contain any underscore. SEE ALSO
gsettings-data-convert(1) a related command to migrate user settings from GConf to GSettings. User Commands 01/21/2013 GSETTINGS-SCHEMA-C(1)
All times are GMT -4. The time now is 12:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy