Thanks for the reply. Sorry if i am not clear here.
suppose file1 is as follow ( and other files file2, file3 etc also similar to this, only data is different)
dir1, dir2, dir3,dir4 contain the logs, log1.txt,log2.txt,log3.txt
log1.txt is inside dir1
log2.txt is inside dir2
log3.txt is inside dir3
log4.txt is inside dir4
dir1,dir2,dir3 etc names are always like this, i.e always word "dir" comes at the starting in directory name.
suppose log1.txt is
log2.txt is
log3.txt is
log4.txt is
so i am thinking like:
1) Traverse file xyz.txt
2) First, read file1, store the filename(file1) in some variable
3) Traverse through dir1,dir2,dir3,dir4 and cut the first field from 1-14 ( only the numbers) from the logs log1.txt, log2.txt, log3.txt, log4.txt i.e.
4) grep these numbers from the file1 and make a new file.
5) Then, repeat the same steps from 2) to 4) for file2
6) Then, repeat the same steps from 2) to 4) for file3
hi
i am having four files in a directory.like
1)sampleRej
2)exampleRej
3)samplemain
4)examplemain
my requirement is i have to search for the rejected files (sampleRej,exampleRej) in a directory.if these files in that directory then i have to delete the main files... (3 Replies)
unix program to which a directory name will be passed as
parameter. This directory will contain files with various
extensions. This script will create directories with the names of the
extention of the files and then put the files in the
corresponding folder. All files which do not have any... (2 Replies)
create a file inside a directory in one command
like
current directory is root
i want to create a directory inside root and a file inside that directory
is there any command like
touch /d/d.txt d directory does not exist (1 Reply)
hi
pls give me a script to compress all directories inside a directory and remove the original uncompressed version...
>>
please also tell the single commmand to uncompress all the directories back...whemn needed (2 Replies)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
I'm trying to make a script that will list all directories under a selection as well as the number of files in each.
I cannot get it to work under a symbolic link.
The file structure is:
XXX_20131127_001
dir01 (sym link)
2404x912
file.0000.xxx to
... (10 Replies)
Can anyone help me with a short command or script for the below scenario
there is a path,
/a/b/c/home??
Inside the above path there are number of subdirectories such as
one
two
three
four
i need to take all the subdirectories inside home?? with full path. i need only one level of... (4 Replies)
hi,
i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D Archive E Log F
which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Hi All,
Daily I am getting the updated file.
I have to search for this file in all directories and sub directories.
If the file existed in a particular directory then move this updated file to that particular directory.
If the file is not existed in any of the directories then place this... (4 Replies)