Sponsored Content
Operating Systems BSD proper syntax of grep command Post 302299944 by TonyFullerMalv on Sunday 22nd of March 2009 12:47:21 PM
Old 03-22-2009
Put the filename with spaces in it inside speech marks, e.g.:
Code:
$ grep "I am writing" "/home/user/docs/text file.txt"

File names with spaces are best avoided for Unix...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with the syntax using awk+grep

Hi, I need to extract information from a 4 GB file based on the following conditions: 1) Check for the presence of a set of account numbers Each account number is present along with other information within a PAGESTART and PAGEEND. The file looks like this: PAGESTART ACCOUNT NO 123... (6 Replies)
Discussion started by: kthri
6 Replies

2. Shell Programming and Scripting

grep syntax for this...

I wanna grep for a pattern logs 1 2 & 3 within a folder containing 100 logs grep "test" /folder/log1 /folder/log2 /folder/log3 The above command will work fine but is there any command like grep "test" /folder/log1, log2, log3 or something similar (4 Replies)
Discussion started by: roshanjain2
4 Replies

3. Shell Programming and Scripting

Net::SSH::Perl->Execute any unix command & display the output in a proper form

Net::SSH::Perl ...... how to print the output in a proper format my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies

4. UNIX for Dummies Questions & Answers

| help | unix | grep (GNU grep) 2.5.1 | advanced regex syntax

Hello, I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide. ls -aLl /bin | grep "\(x\)" Which works, just highlights 'x' where ever, when ever. I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies

5. UNIX for Dummies Questions & Answers

Proper syntax

I'm new to Unix, and just had a quick question. I'm writing a bash script, and I was wondering what proper programming etiquette was for piping. How many pipes is too many pipes? OLDEST=$(find . -maxdepth 1 -type d -newermt 2012-07-01 ! -newermt 2012-07-30 | xargs ls -1td | tail -2) echo... (1 Reply)
Discussion started by: jrymer
1 Replies

6. Shell Programming and Scripting

Need to grep this Data in proper format:- Please Guide

Hi Guys, I need to grep below data in this format backup_id creation expiration policy sched_label backup_id = picoserver38_1212077050, version = 2 creation = 05/29/2008 18:04:10 (1212077050) expiration = 06/29/2008 18:04:10 (1214755450) retention_level = 3, fragment = 2, file_num = 1... (14 Replies)
Discussion started by: manalisharmabe
14 Replies

7. Shell Programming and Scripting

Proper way to pipe into awk command

What is the proper way to run two commands together? For example, in the below I would like run a command in bold then pipe that output to awk to re-format it. Thank you :). bedtools nuc -fi /home/cmccabe/Desktop/bed/hg19.fa -bed /home/cmccabe/Desktop/bed/xgen_baits.bed >... (3 Replies)
Discussion started by: cmccabe
3 Replies

8. Shell Programming and Scripting

Help on grep syntax in UNIX

Dear Team /app/Appln/logs/ echo Session used server are 'grep -i pid|grep -i session | cut -d'.' -f1 | awk '{print $9}' | sort | uniq' Output - lxserver01 lxserver02 lxserver03 When I grep session pid in logs server details I can see above distinct server details but I... (6 Replies)
Discussion started by: skp
6 Replies

9. Shell Programming and Scripting

Proper Use of WAIT Command Within .ksh

I am trying to write a korn shell script (Z.ksh) that will execute three other korn shell scripts within it. The three korn shell scripts (A.ksh,B.ksh,C.ksh) each execute a series of .sas programs. A.ksh, B.ksh, and C.ksh must each wait until the last .sas program within them executes and finishes... (2 Replies)
Discussion started by: imoore
2 Replies

10. UNIX for Beginners Questions & Answers

FIND and GREP syntax

I have a question to this command find . -type f -name ".*txt" -exec grep "text" {}\. The find command will locate a file name with the extension of txt once per round and find the word "text" in the content of the file or the find command will locate all the file names with the extension of... (2 Replies)
Discussion started by: TestKing
2 Replies
wnn_hinsi.data(4)						   File Formats 						 wnn_hinsi.data(4)

NAME
wnn_hinsi.data - Wnn6 part of speech administration file SYNOPSIS
/usr/lib/locale/ja/wnn/ja/hinsi.data DESCRIPTION
hinsi.data is a file that contains information required to administer the main parts of speech. Numbers are allocated in the order of the parts of speech and composite parts of speech defined in hinsi.data. These numbers are used when creating dictionary files and part of speech files, when looking up part of speech names by numbers from the client and server, and looking up the parts of speech in composite parts of speech. Numbers are assigned in ascending order starting at 0. Only the following operations are allowed for this file: appending new parts of speech or composite parts of speech to the end of the file and replacing lines consisting of only "@" with definitions of parts of speech or composite parts of speech. NEVER DELETE ENTRIES. "@" is used to reserve lines in the file in advance when part of speech names have not yet been determined. The part of speech formats for lines in this file are as follows: part_of_speech composite_part_of_speech $ part_of_speech : part_of_speech:...:part_of_speech All parts of speech appearing in definitions of composite parts of speech must be defined before the composite part of speech can be defined. There must not be more than one part of speech or composite part of speech with the same name. Everything on a line following a semicolon (;) is treated as comment and ignored. Information on this file (looking up part of speech names from part of speech numbers and looking up the structural elements of composite parts of speech) are provided by the library and can thus be referenced through the client process. EXAMPLES
Example 1: [SENTOU] ;Beginning of a sentence [MEISHI] ;Indicates a noun. [ICHIDAN] [ICHIDANMEI]$[ICHIDAN]:[MEISHI] ;A composite part of speech @ @ NOTES
Information on the main parts of speech must be consistent between all dictionaries and connection information files. Do not edit and change hinsi.data. (If the file is changed, the meaning of the part of speech numbers in dictionaries and connection information files created with the old part of speech administration file will change.) SunOS 5.10 28 May 1998 wnn_hinsi.data(4)
All times are GMT -4. The time now is 05:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy