Sponsored Content
Top Forums Shell Programming and Scripting How to handle grepping variable data containing wildcards? Post 302983356 by abercrom on Monday 10th of October 2016 02:15:46 PM
Old 10-10-2016
You got me looking back at the quotes again and I found the problem where I initially strip out the fields I need for the pattern. What a dumb mistake!
Yes, I should try to make it simpler. Smilie
Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grepping using multiple wildcards

Is there anyway you can grep using multiple wildcards? When I run the below line the results return fine; grep 12345 /usr/local/production/soccermatchplus/distributor/clients/*/out/fixtures.xml | awk -F/ '{print $8}' However ideally, I need it to grep for; grep 12345... (3 Replies)
Discussion started by: JayC89
3 Replies

2. UNIX for Dummies Questions & Answers

grepping a variable

I need to pass a parameter that will then be grepped. I need it to grep /paramater and then have a space so if 123 was passed my grep would be grep '/123 ' sample.log this works fine from the command line but when i try and set it searchThis="/$2 " and then run grep $searchThis... (6 Replies)
Discussion started by: magnia
6 Replies

3. Shell Programming and Scripting

Grepping Date Variable

Hello, I would like for the user to input the date for a particular log file, then have the input sent to a variable, which is then used via grep to extra the logs for the specific date the user request. I did some searching, but I still don't understand why I'm not seeing any result. ... (4 Replies)
Discussion started by: ravzter
4 Replies

4. Shell Programming and Scripting

problem in using cgi_script to handle form data

Hi, I have an HTML form through which I get some text as input. i need to run a shell script say script.sh inside a perl-cgi script named main_cgi.sh on the form input. I want to write the contents of the form in a file and then perform some command line operations like grep, cat on the text... (0 Replies)
Discussion started by: piyush_priya
0 Replies

5. Shell Programming and Scripting

Help with grepping data from a text file

Hello, I have a text file which contains a list of strings which I want to grep from another file where these strings occur and print out only these lines. I had earlier used the grep command where File1 was the file containing the strings to be grepped (Source File) and File2 the Target File... (4 Replies)
Discussion started by: gimley
4 Replies

6. Shell Programming and Scripting

Grepping for variable in brackets

I have a script which reads a number out of a log file. The pertinent line is this: cat /tmp/listofnumbers When I run cat /tmp/listofnumbers what I am seeing is on each line. I am trying to make the script read from that file and grep for a variable like the following line should do: ... (4 Replies)
Discussion started by: newbie2010
4 Replies

7. Shell Programming and Scripting

Grepping data using awk

Hello, I have a data in file 1 2000000024776 2000000026979 2000000033355 2000000036309 2000000041291 2000000042679 2000000067221 and in file 2 its like this 2000000024776 16 2000000026979 16 2000000033355 16 (2 Replies)
Discussion started by: mirwasim
2 Replies

8. Shell Programming and Scripting

Grepping the data between 2 date ranges

Hi There, Good Day !! I have txt file containing data in the below format. There are many lines, here i have mentioned for example. cat remo.txt 2/3/2017 file1 3/4/2016 file2 6/6/2015 file5 1/1/2018 file3 4/3/2014 file4 - - - I need to grep the file names for given date rage... (11 Replies)
Discussion started by: kumar85shiv
11 Replies

9. UNIX for Beginners Questions & Answers

Expand Variables and Wildcards into another variable.

Dear Forum members, I am having trouble getting the complete filename (and directory path) in a variable. Output directory mentioned in the code have three files: DISPLAY_CITY_DETAILS_15-05-2019-08-29-26_MIGRATE_london.out DISPLAY_CITY_DETAILS_15-05-2019-08-29-26_MIGRATE_paris.out... (4 Replies)
Discussion started by: chetanojha
4 Replies

10. UNIX for Beginners Questions & Answers

Grepping for one variable while using awk to parse an associated variable

Im trying to search for a single variable in the first field and from that output use awk to extract out the lines that contain a value less than a value stored in another variable. Both the variables are associated with each other. Any guidance is appreciated. File that contains the... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
strip(1)						      General Commands Manual							  strip(1)

NAME
strip - Removes symbols and relocation bits SYNOPSIS
strip [-V] file... STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: strip: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
[SVID 3] Displays the version number of the strip command. DESCRIPTION
The strip command removes the symbol table and any strippable subsections of the section, including compact relocation information ordinar- ily present in executable files. This is useful to save space after a program has been debugged. The effect of strip is the same as use of the -s option to cc, c89, or ld. Note that the strip command will not strip executables with unresolved relocation entries. It also does not handle archive files. EXIT STATUS
Success. An error occurred. ENVIRONMENT VARIABLES
The following environment variables affect the behavior of strip: Provides a default value for the locale category variables that are not set or null. If set, overrides the values of all other locale variables. Determines the locale for the interpretation of byte sequences as characters (single-byte or multibyte) in input parameters and files. Determines the locale used to affect the format and contents of diagnostic messages displayed by the command. Determines the location of message catalogs for processing of LC_MESSAGES. Determines the directory where a temporary file will be created (if needed). If not set, the current working directory is used. SEE ALSO
Commands: ar(1), cc(1), c89(1), ld(1), mcs(1) Standards: standards(5) strip(1)
All times are GMT -4. The time now is 01:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy