10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I'm grepping for the following right now:
ls -la /somedirectory/*.log* | awk '{print $9}'
The problem with this is that I get the following output:
/somedirectory/errors_1_foo.log
/somedirectory/errors_1_foo.log.1
/somedirectory/errors_1_foo.log.2... (4 Replies)
Discussion started by: LinuxRacr
4 Replies
2. Shell Programming and Scripting
Hi,
We are doing some migration work. The same files may exist in different partition/mountpoints. We may place it in a single place, hence we don't want any duplicates...we will rename the file names if we know the files which has duplicates(by file name)).
It would be nice if a script... (3 Replies)
Discussion started by: saravanapandi
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have got some 10 filenames stored in a file or displayed in the console as a result of some query i made.. Now I need to open each of these files and search for a pattern in these 10 files.. Can someone help me with this?
Thanks,
Jean (9 Replies)
Discussion started by: jeanjkj
9 Replies
4. Shell Programming and Scripting
Hi,
Could someone give me a hand with a search for files with two possible extensions, please. The requirement is simple - I need to issue a single ls command searching for files with the suffix of, say, *.txt and *.log.
I've tried to use ls *.txt *.log which works if there are both... (4 Replies)
Discussion started by: neilmw
4 Replies
5. UNIX for Dummies Questions & Answers
Hello all,
i have tons of files in folder named like this (yyyymmdd):
bookcollection20100729
bookcollection20100730
bookcollection20100731
bookcollection20100801
bookcollection20100802
etc.
I need to find files with date range in there names lets say from 2010.07.30 - 2010.08.02
... (10 Replies)
Discussion started by: Whit3H0rse
10 Replies
6. Shell Programming and Scripting
Hi All,
I have a file (Names.txt) and the contents of the file is give below.
$ cat Names.txt
FF313207008.txt
FF223207007.txt
FF143207006.txt
FF372150600.txt
FF063407005.txt
FF063307005.txt
$
From these given file names I want to find the files which has the 6th index value as 2. So... (5 Replies)
Discussion started by: krish_indus
5 Replies
7. UNIX for Advanced & Expert Users
Suppose there are multiple files containing certain text "abc". How to print the name of all such files with a single command from unix prompt?
Thanks in advance (6 Replies)
Discussion started by: skyineyes
6 Replies
8. Shell Programming and Scripting
I am trying to grep for filenames containing a specific value within a particular segment. The lines containing the segment I'm looking through reads like "HL^1^^1^1", "10^9^9^0", and "HL^11^4^8^1". I would like to find the data that contains only the number nine after the third caret where the... (4 Replies)
Discussion started by: HLee1981
4 Replies
9. Shell Programming and Scripting
Hi,
I have 5 files in a directory.
emp1_usage.txt
emp2_usage.txt
emp3_usage.txt
emp4_usage.txt
emp5_usage.txt
I am using sqlldr to get the contents of the above 5 files and store it in a temp table and update my original table using temp table.
for f in *emp*.txt
do
sqlldr... (3 Replies)
Discussion started by: pathanjalireddy
3 Replies
10. Shell Programming and Scripting
I want to check the second argument for a specific string .
The code below is what I am trying, but I get:
UX:test (./test): ERROR: { if ($0 ~ /StringImLooking4/) {print $1} }: Unknown operator
I want to test if the second argument contains the string StringImLooking4
Unixware 7
... (1 Reply)
Discussion started by: dinplant
1 Replies