07-18-2002
Find -name "*.txt" in Korn Shell Script
The following find command works on the Korn Shell command line:
find . \( ! -name . -prune \) -type f -name "*.txt" -mtime +100
In the particular directory I'm in, the above find will list correctly the three text files that exist that haven't been modified in over 100 days:
./ep75150aA.txt
./ep13217a_rx_history11122001150339.txt
./ep13217a_rx_history12112001162013.txt
./Report2_ep75150a.txt
When that same find command runs within a Korn Shell script (against the same dir), it does not list the three files. It only shows:
drwxrwxrwx 2 7 devel 150528 Jul 18 11:28 .
What am I missing?
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to display a full "ls -l" line per selection using the korn shell "select" command.
ie :
1) -rw-rw---- 1 u22adm tbs 6144 Mar 15 10:29 y.dat
2) -rw-rw---- 1 u22adm tbs 4096 Mar 15 10:29 y.idx
etc
etc
I can get spaces in :
select f in "a a" "b b" "c c"; do... (2 Replies)
Discussion started by: mpegler
2 Replies
2. Shell Programming and Scripting
Hi,
I am trying to write a script which will loop until a certain action has been performed. I have two files i would like to compares.
For example:
file1 has a list of user ids (about 900) from the company's e-mail server.
file2 has a list of user ids (about 50 or so) from... (7 Replies)
Discussion started by: muzica
7 Replies
3. UNIX for Dummies Questions & Answers
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies
4. Shell Programming and Scripting
Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
Discussion started by: swamymns
9 Replies
5. AIX
Hi,
This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies
6. Shell Programming and Scripting
why is this giving me errors?
i type this in: find / -name "something.txt" 2>/dev/null
i get the following error messages:
find: bad option 2
find: path-list predicate-list
:confused: (5 Replies)
Discussion started by: magiling
5 Replies
7. Shell Programming and Scripting
Hi all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies
8. Shell Programming and Scripting
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies
9. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
10. Programming
Hello everyone,
Since my python knowledge is limimted, I've challenged myself to learn as much as possible to help me with my carrere. I'm currently trying to convert a shell script to python, just to give myself a task. There is one section of the script that I'm having issues converting and... (2 Replies)
Discussion started by: da1
2 Replies
LEARN ABOUT DEBIAN
ard-parse-boards
ARD-PARSE-BOARDS(1) General Commands Manual ARD-PARSE-BOARDS(1)
NAME
ard-parse-boards - Read data from the Arduino boards.txt file
USAGE
Dump all the data in the file:
$ ard-parse-boards --dump
See which boards we know about:
$ ard-parse-boards --boards
Look for a particular board...
$ ard-parse-boards --find uno
multiple terms are implicitly ANDed:
$ ard-parse-boards --find duemil 328
Dump all the data for a particular board:
$ ard-parse-boards atmega328
Extract a particular field:
$ ard-parse-boards atmega328 build.f_cpu
DESCRIPTION
The Arduino software package ships with a boards.txt file which tells the Arduino IDE details about particular hardware. So when the user
says he's got a shiny new Arduino Uno, boards.txt knows that it has a 16MHz ATmega328 on it. It would be nice to access these data from the
command line too.
In normal operation you simply specify the tag given to the board in the boards.txt file, and optionally a field name. This program then
extracts the data to STDOUT.
Most boards have names which are quite unwieldy, so we always refer to a board by a tag, not its name. Strictly the tag is the bit before
the first dot in the boards.txt key. You can see a list of board tags and names with the "--boards" option.
OPTIONS
--boards_txt=[file]
Specify the full path to the boards.txt file.
The following options all disable the normal 'lookup' operation.
--dump Dump the complete database in YAML format.
--boards
Print a list of the tag and name of every board in the file.
--find [query] <query> ...
Find matching data. Strictly, return a list of values which match all of the query terms, treating each term as a case-insensitive
regexp.
For example:
--find 328
List data containing 328 (anywhere in the value).
--find due
List data containing 'due' (e.g. duemilanove).
--find 328 due
List data containing both 328 and due.
BUGS AND LIMITATIONS
There are no known bugs in this application.
Please report problems to the author.
Patches are welcome.
AUTHOR
Martin Oldfield, ex-atelier@mjo.tc
Thanks to Mark Sproul who suggested doing something like this to me ages ago.
LICENSE AND COPYRIGHT
Copyright (c) 2011, Martin Oldfield. All rights reserved.
This file is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MAY 2012 ARD-PARSE-BOARDS(1)