Sponsored Content
Top Forums Shell Programming and Scripting Find word in a directory files Post 302769647 by busyboy on Wednesday 13th of February 2013 01:51:43 AM
Old 02-13-2013
Code:
for f in /tmp/satemp/*
do
cat words.txt| while read line
do 
awk -vLIT="$line" '$0 ~ LIT { print LIT,"Found in ",FILENAME; }' $f
done
done


Last edited by busyboy; 02-13-2013 at 02:52 AM.. Reason: code tags
This User Gave Thanks to busyboy For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search for certain word in a files from directory

hi can i know how to get the file name of any files containing for example "abc" from a number of files in a directory? i tried "ls -ltrc | grep abc" but no resulted generated. thanks in advance. (1 Reply)
Discussion started by: legato
1 Replies

2. Shell Programming and Scripting

Shell:Find a word in files in a directory and subdirectories

I'm looking to write a ksh code with will be alble to find a word like 'toto' in all files going from my current directory. eg. /doc ----------->have: text.c which "toto" /doc/usr-------->have: build.pc, help.java which "toto" /doc/usr/cach -->have: test.sh which "toto" /doc/build... (4 Replies)
Discussion started by: yeclota
4 Replies

3. UNIX for Dummies Questions & Answers

How to find a word in a all the files in a Directory??

I want to find a specific word present in all the files ina directory....Please tell me the command to be used?? Thanks (6 Replies)
Discussion started by: shikhakaul
6 Replies

4. Shell Programming and Scripting

Delete all files if another files in the same directory has a matching occurence of a specific word

Hello, I have several files in a specific directory. A specific string in one file can occur in another files. If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string. Example. file1 ShortName "Blue... (2 Replies)
Discussion started by: premier_de
2 Replies

5. Shell Programming and Scripting

Find and replace a word in all the files (that contain the word) under a directory

Hi Everyone, I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap". For Example: In the Directory, $pwd /home/nick $ grep -l "xsgd1234dap" *.sh | wc -l 119 I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies

6. Shell Programming and Scripting

How can i find a word inside a file from a directory and it's subdirectory ?

Suppose i have a word "mail". I have to search this word in all files inside a directory and it's sub-directories. It will also search in all hidden directory and sub-directories. If it finds this word in any file it will list that file. How can i do this with perl/ruby/awk/sed/bash or... (9 Replies)
Discussion started by: cola
9 Replies

7. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

8. Shell Programming and Scripting

Delete all files if another files in the same directory has a matching occurrence of a specific word

he following are the files available in my directory RSK_123_20141113_031500.txt RSK_123_20141113_081500.txt RSK_126_20141113_041500.txt RSK_126_20141113_081800.txt RSK_128_20141113_091600.txt Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies

9. Shell Programming and Scripting

Find command to find a word from list of files

I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation. When I tried like below, -bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation -bash-4.1$ find ./ -name % Retail by State find: paths must precede expression: Retail Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

10. Shell Programming and Scripting

Find a word and increment the number in the word & save into new files

Hi All, I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl: run_build_model sparc_ifu_dec run_drc set_faults -model path_delay -atpg_effectiveness -fault_coverage add_delay_paths P1 set_atpg -abort_limit 1000 run_atpg -ndetects 1000 I would like... (6 Replies)
Discussion started by: jypark22
6 Replies
DateTime::Locale::so(3) 				User Contributed Perl Documentation				   DateTime::Locale::so(3)

NAME
DateTime::Locale::so SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'so' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Somali. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) Isniin Salaaso Arbaco Khamiis Jimco Sabti Axad Abbreviated (format) Isn Sal Arb Kha Jim Sab Axa Narrow (format) I S A K J S A Wide (stand-alone) Isniin Salaaso Arbaco Khamiis Jimco Sabti Axad Abbreviated (stand-alone) Isn Sal Arb Kha Jim Sab Axa Narrow (stand-alone) I S A K J S A Months Wide (format) Bisha Koobaad Bisha Labaad Bisha Saddexaad Bisha Afraad Bisha Shanaad Bisha Lixaad Bisha Todobaad Bisha Sideedaad Bisha Sagaalaad Bisha Tobnaad Bisha Kow iyo Tobnaad Bisha Laba iyo Tobnaad Abbreviated (format) Kob Lab Sad Afr Sha Lix Tod Sid Sag Tob KIT LIT Narrow (format) K L S A S L T S S T K L Wide (stand-alone) Bisha Koobaad Bisha Labaad Bisha Saddexaad Bisha Afraad Bisha Shanaad Bisha Lixaad Bisha Todobaad Bisha Sideedaad Bisha Sagaalaad Bisha Tobnaad Bisha Kow iyo Tobnaad Bisha Laba iyo Tobnaad Abbreviated (stand-alone) Kob Lab Sad Afr Sha Lix Tod Sid Sag Tob KIT LIT Narrow (stand-alone) K L S A S L T S S T K L Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated Ciise ka hor Ciise ka dib Narrow Ciise ka hor Ciise ka dib Date Formats Full 2008-02-05T18:30:30 = Salaaso, Bisha Labaad 05, 2008 1995-12-22T09:05:02 = Jimco, Bisha Laba iyo Tobnaad 22, 1995 -0010-09-15T04:44:23 = Sabti, Bisha Sagaalaad 15, -10 Long 2008-02-05T18:30:30 = 05 Bisha Labaad 2008 1995-12-22T09:05:02 = 22 Bisha Laba iyo Tobnaad 1995 -0010-09-15T04:44:23 = 15 Bisha Sagaalaad -10 Medium 2008-02-05T18:30:30 = 05-Lab-2008 1995-12-22T09:05:02 = 22-LIT-1995 -0010-09-15T04:44:23 = 15-Sag--10 Short 2008-02-05T18:30:30 = 05/02/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/09/-10 Default 2008-02-05T18:30:30 = 05-Lab-2008 1995-12-22T09:05:02 = 22-LIT-1995 -0010-09-15T04:44:23 = 15-Sag--10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 gn UTC 1995-12-22T09:05:02 = 9:05:02 sn UTC -0010-09-15T04:44:23 = 4:44:23 sn UTC Long 2008-02-05T18:30:30 = 6:30:30 gn UTC 1995-12-22T09:05:02 = 9:05:02 sn UTC -0010-09-15T04:44:23 = 4:44:23 sn UTC Medium 2008-02-05T18:30:30 = 6:30:30 gn 1995-12-22T09:05:02 = 9:05:02 sn -0010-09-15T04:44:23 = 4:44:23 sn Short 2008-02-05T18:30:30 = 6:30 gn 1995-12-22T09:05:02 = 9:05 sn -0010-09-15T04:44:23 = 4:44 sn Default 2008-02-05T18:30:30 = 6:30:30 gn 1995-12-22T09:05:02 = 9:05:02 sn -0010-09-15T04:44:23 = 4:44:23 sn Datetime Formats Full 2008-02-05T18:30:30 = Salaaso, Bisha Labaad 05, 2008 6:30:30 gn UTC 1995-12-22T09:05:02 = Jimco, Bisha Laba iyo Tobnaad 22, 1995 9:05:02 sn UTC -0010-09-15T04:44:23 = Sabti, Bisha Sagaalaad 15, -10 4:44:23 sn UTC Long 2008-02-05T18:30:30 = 05 Bisha Labaad 2008 6:30:30 gn UTC 1995-12-22T09:05:02 = 22 Bisha Laba iyo Tobnaad 1995 9:05:02 sn UTC -0010-09-15T04:44:23 = 15 Bisha Sagaalaad -10 4:44:23 sn UTC Medium 2008-02-05T18:30:30 = 05-Lab-2008 6:30:30 gn 1995-12-22T09:05:02 = 22-LIT-1995 9:05:02 sn -0010-09-15T04:44:23 = 15-Sag--10 4:44:23 sn Short 2008-02-05T18:30:30 = 05/02/08 6:30 gn 1995-12-22T09:05:02 = 22/12/95 9:05 sn -0010-09-15T04:44:23 = 15/09/-10 4:44 sn Default 2008-02-05T18:30:30 = 05-Lab-2008 6:30:30 gn 1995-12-22T09:05:02 = 22-LIT-1995 9:05:02 sn -0010-09-15T04:44:23 = 15-Sag--10 4:44:23 sn Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 Sal 1995-12-22T09:05:02 = 22 Jim -0010-09-15T04:44:23 = 15 Sab Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 gn 1995-12-22T09:05:02 = 9:05 sn -0010-09-15T04:44:23 = 4:44 sn Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 gn 1995-12-22T09:05:02 = 9:05:02 sn -0010-09-15T04:44:23 = 4:44:23 sn M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = Sal, 2-5 1995-12-22T09:05:02 = Jim, 12-22 -0010-09-15T04:44:23 = Sab, 9-15 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMM (LLL) 2008-02-05T18:30:30 = Lab 1995-12-22T09:05:02 = LIT -0010-09-15T04:44:23 = Sag MMMd (MMM d) 2008-02-05T18:30:30 = Lab 5 1995-12-22T09:05:02 = LIT 22 -0010-09-15T04:44:23 = Sag 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Sal Lab 5 1995-12-22T09:05:02 = Jim LIT 22 -0010-09-15T04:44:23 = Sab Sag 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = Bisha Labaad 5 1995-12-22T09:05:02 = Bisha Laba iyo Tobnaad 22 -0010-09-15T04:44:23 = Bisha Sagaalaad 15 MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 Bisha Labaad 1995-12-22T09:05:02 = 22 Bisha Laba iyo Tobnaad -0010-09-15T04:44:23 = 15 Bisha Sagaalaad MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Sal Bisha Labaad 5 1995-12-22T09:05:02 = Jim Bisha Laba iyo Tobnaad 22 -0010-09-15T04:44:23 = Sab Bisha Sagaalaad 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = Sal, 2008-2-5 1995-12-22T09:05:02 = Jim, 1995-12-22 -0010-09-15T04:44:23 = Sab, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Lab 1995-12-22T09:05:02 = 1995 LIT -0010-09-15T04:44:23 = -10 Sag yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Sal, 2008 Lab 5 1995-12-22T09:05:02 = Jim, 1995 LIT 22 -0010-09-15T04:44:23 = Sab, -10 Sag 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Bisha Labaad 1995-12-22T09:05:02 = 1995 Bisha Laba iyo Tobnaad -0010-09-15T04:44:23 = -10 Bisha Sagaalaad yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyMM (MM/yy) 2008-02-05T18:30:30 = 02/08 1995-12-22T09:05:02 = 12/95 -0010-09-15T04:44:23 = 09/-10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = Bisha Labaad 2008 1995-12-22T09:05:02 = Bisha Laba iyo Tobnaad 1995 -0010-09-15T04:44:23 = Bisha Sagaalaad -10 Miscellaneous Prefers 24 hour time? No Local first day of the week Isniin SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.3 2014-06-10 DateTime::Locale::so(3)
All times are GMT -4. The time now is 01:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy