07-15-2008
Can any body give me a solution to this...
Hi friends..
I am using the below command to search few files from many folders which is under one folder..
i mean let say the path is A/B/C...and inside C...i have 1-10 folder...
the below command is working fine....
for i in 1 3 5 7; do
find /A/B/C/${i} -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name "*.dat" |xargs ls -ltr |awk '{print $8 ,$9}' >> ${i}.txt
done
this will give me the result from the folder 1 3 5 7 ,from 1-10 which is inside A/B/C[/b] and print the file having the above extension into 1.txt , 3.txt , 5.txt , 7.txt etc inside /A/B/C
Help needed..
i need some help so that my syntax will search the file only from folder 1,3,5,7 from the 10 folder A/B/C and the out put from these 4 folder will be display in the single file i.e result.txt....not in different folder.
the above 1,3,5,7 folders are inside A/B/C
6 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
create one script
That reads a file <file>
Each line of <file> file contains just an account
The run the grep command like below
/usr/xpg4/bin/grep -E -e 'ACCOUNT.*' < File> > <OUTPUT FILE> (1 Reply)
Discussion started by: sapan123
1 Replies
2. Shell Programming and Scripting
Hi i need some help...
1.i have one main folder XYZ.
2.Many folders inside xyz say abc,def,mno
3.And inside each folder, i have many files .
want to print what ever files are present inside the subfolder abc,def,mno (what ever todays file ) in output file.out put file should be in xyz(say... (13 Replies)
Discussion started by: sapan123
13 Replies
3. Linux
:(I want to install linux (SLES-9-SP4-CD-x86_64-GM-CD1) but it doesnot work. It said the computer is 32 bits you cannot use 64 bits on it. (3 Replies)
Discussion started by: sackNumchai
3 Replies
4. UNIX for Dummies Questions & Answers
Hi friends..
I am using the below command to search few files from many folders which is under one folder..
i mean let say the path is A/B/C...and inside C...i have 1-10 folder...
the below command is working fine....
for i in 1 3 5 7; do
find /A/B/C/${i} -name "*.txt" -o -name "*.csv"... (2 Replies)
Discussion started by: sapan123
2 Replies
5. Shell Programming and Scripting
Hello All,
I wish to mail after completion of code. I would like to include subject and body in it. I am not looking to read the body from other file but willing to provide the body in the command itself. Can i do this way?
I am looking to pass some parameters to body and this will be possible... (1 Reply)
Discussion started by: forums123456
1 Replies
6. What is on Your Mind?
Our moderators/admins/users are doing great job by sharing knowledge with each other, they do correct/appreciate us in posts.
This poll is to encourage emerging users to go in a better direction, kindly do give your thoughts on same.
1- Giving them a reward/appreciation if they are... (31 Replies)
Discussion started by: RavinderSingh13
31 Replies
LEARN ABOUT DEBIAN
unseen
NEW(1) [nmh-1.5] NEW(1)
NAME
new - report on folders with new messages
fnext - set current folder to next folder with new messages
fprev - set current folder to previous folder with new messages
unseen - scan new messages in all folders with new messages
SYNOPSIS
new [sequences] [-mode mode] [-folders foldersfile] [-version] [-help]
fnext is equivalent to new -mode fnext
fprev is equivalent to new -mode fprev
unseen is equivalent to new -mode unseen
DESCRIPTION
New in its default mode produces a one-line-per-folder listing of all folders containing messages in the listed sequences or in the
sequences listed in the profile entry "Unseen-Sequence". Each line contains the folder, the number of messages in the desired sequences,
and the message lists from the .mh_sequences file. For example:
foo 11.* 40-50
bar 380. 760-772 824-828
total 391.
The `*' on foo indicates that it is the current folder. The last line shows the total number of messages in the desired sequences.
New crawls the folder hierarchy recursively to find all folders, and prints them in lexicographic order. Override this behavior by provid-
ing foldersfile containing the pre-sorted list of folders new should check, one per line.
In fnext and fprev modes, new instead changes to the next or previous matching folder, respectively.
In unseen mode, new executes scan sequences for each matching folder.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Current-Folder: To find the default current folder
Unseen-Sequence: The name of the unseen message sequence
SEE ALSO
scan(1), mh-format(5)
HISTORY
Based on Luke Mewburn's new (http://www.mewburn.net/luke/src/new).
MH.6.8 11 June 2012 NEW(1)