10 More Discussions You Might Find Interesting
1. Linux
Hi,
I am trying to merge two csv files based on matching criteria:
File description is as below :
Key_File :
000|ÇÞ|Key_HF|ÇÞ|Key_FName
001|ÇÞ|Key_11|ÇÞ|Sort_Key22|ÇÞ|Key_31
002|ÇÞ|Key_12|ÇÞ|Sort_Key23|ÇÞ|Key_32
003|ÇÞ|Key_13|ÇÞ|Sort_Key24|ÇÞ|Key_33
050|ÇÞ|Key_15|ÇÞ|Sort_Key25|ÇÞ|Key_34... (3 Replies)
Discussion started by: PK29
3 Replies
2. Shell Programming and Scripting
There are 4 files inside one folder matching criteria i.e. File name = ABCJmdmfbsjopXXXXXXX_mm-dd-yyyy_XXX.data
Here is the Code which find the files matching criteria:-
TS=`date +"%m-%d-%Y"`| for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data"`
do # Matching File Processing Code.... (1 Reply)
Discussion started by: lancesunny
1 Replies
3. Shell Programming and Scripting
i have a directory which consist of multiple files out of which there are some files that has -e in their name.
I want to write a script that will change all those file-name to -l
example there are some files with name :
file1-e.wav
file2-e.wav
file3-english-e.wav
file-4-e.wav
... (3 Replies)
Discussion started by: mukulverma2408
3 Replies
4. Shell Programming and Scripting
Dear Friends,
I am looking for a way to replace a string (multiple lines) starting with something and ending with something (these two values do not change) with blank. Basically I want to delete this code injection accross many sites and folders.
Search Code (across files and folders) that... (2 Replies)
Discussion started by: libras
2 Replies
5. UNIX for Dummies Questions & Answers
I have a requirement where in i need to select records right below the search criteria
qwertykeyboard white
10 20 30
30 40 50
60 70 80
qwertykeyboard black
40 50 60
70 90 100
qwertykeyboard and white are headers separated by a tab.
when i execute my script..i would be searching... (4 Replies)
Discussion started by: vinnu10
4 Replies
6. Shell Programming and Scripting
I have 2 text files like
________________________________
Company Name:yada yada
ADDRESS:some where, CITY,STATE
CONTACT PEOPLE:first_name1.last_name1,first_name2.last_name2,first_name3.last_name3
LEAD:first_name.last_name
________________________________
&
Data file2 ... (1 Reply)
Discussion started by: rider29
1 Replies
7. Shell Programming and Scripting
Hello everyone!I am trying to make a mail list(a simple .txt file)in which i put certain records that match specific criteria.
Let's say that i have a(sorted by last column file)like this one:
0100567 Bla1 Lala1 100
1234567 Bla2 Lala2 80
8769029 Bla3 Lala3 70
1001007 ... (0 Replies)
Discussion started by: bashuser2
0 Replies
8. Shell Programming and Scripting
Hi all,
i would like to create a script that move and rename files from all the subdirectories of a given directory to others subdirectories of the same directory based on "matching" criteria in the "from" and "to" parameters.
Example:
Begin script
from /home/test/1_T_2008* move to... (3 Replies)
Discussion started by: braidomik
3 Replies
9. Shell Programming and Scripting
Hello,
I'm spendind hours trying to figure out how a script could remove files and folders older than 30days in a given volume (/dataVolumes/Booba.1.0).
Within this volume, all users have their personal folder that starts with "RC-..", so the script should skip them for deletion.
I will... (4 Replies)
Discussion started by: H3001
4 Replies
10. Shell Programming and Scripting
I would like a simple shell script that will allow me to display to screen all unsuccessful su attempts in my sulog file, for the present date.
I have been trying several different combinations of commands, but I can't quite get the syntax correct.
The mess I have right now (don't laugh) is... (4 Replies)
Discussion started by: Relykk
4 Replies
ttysrch(4) File Formats ttysrch(4)
NAME
ttysrch - directory search list for ttyname
DESCRIPTION
ttysrch is an optional file that is used by the ttyname library routine. This file contains the names of directories in /dev that contain
terminal and terminal-related device files. The purpose of this file is to improve the performance of ttyname by indicating which subdirec-
tories in /dev contain terminal-related device files and should be searched first. These subdirectory names must appear on separate lines
and must begin with /dev. Those path names that do not begin with /dev will be ignored and a warning will be sent to the console. Blank
lines (lines containing only white space) and lines beginning with the comment character "#" will be ignored. For each file listed (except
for the special entry /dev), ttyname will recursively search through subdirectories looking for a match. If /dev appears in the ttysrch
file, the /dev directory itself will be searched but there will not be a recursive search through its subdirectories.
When ttyname searches through the device files, it tries to find a file whose major/minor device number, file system identifier, and inode
number match that of the file descriptor it was given as an argument. If a match is not found, it will settle for a match of just
major/minor device and file system identifier, if one can be found. However, if the file descriptor is associated with a cloned device,
this algorithm does not work efficiently because the inode number of the device file associated with a clonable device will never match
the inode number of the file descriptor that was returned by the open of that clonable device. To help with these situations, entries can
be put into the /etc/ttysrch file to improve performance when cloned devices are used as terminals on a system (for example, for remote
login). However, this is only useful if the minor devices related to a cloned device are put into a subdirectory. (It is important to note
that device files need not exist for cloned devices and if that is the case, ttyname will eventually fail.) An optional second field is
used in the /etc/ttysrch file to indicate the matching criteria. This field is separated by white space (any combination of blanks or
tabs). The letter M means major/minor device number, F means file system identifier, and I means inode number. If this field is not speci-
fied for an entry, the default is MFI which means try to match on all three. For cloned devices the field should be MF, which indicates
that it is not necessary to match on the inode number.
Without the /etc/ttysrch file, ttyname will search the /dev directory by first looking in the directories /dev/term, /dev/pts, and /dev/xt.
If a system has terminal devices installed in directories other than these, it may help performance if the ttysrch file is created and con-
tains that list of directories.
EXAMPLES
Example 1 A sample display of /etc/ttysrch command.
A sample /etc/ttysrch file follows:
/dev/term MFI
/dev/pts MFI
/dev/xt MFI
/dev/slan MF
This file tells ttyname that it should first search through those directories listed and that when searching through the /dev/slan direc-
tory, if a file is encountered whose major/minor devices and file system identifier match that of the file descriptor argument to ttyname,
this device name should be considered a match.
FILES
/etc/ttysrch
SEE ALSO
ttyname(3C)
SunOS 5.11 23 Feb 1994 ttysrch(4)