10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
From below directories path I need the directory which comes immediately after the "DataPath"
/var/errors/LogDefaultPath/DataPath/Data01/Data02 (Directory name "Data01" is the result from this path)
/var/errors/LogDefaultPath/DataPath/Log01/Log0202 (Directory name "Log01" is the... (4 Replies)
Discussion started by: Yuvaan12
4 Replies
2. Shell Programming and Scripting
Hi,
I have file in my $datadir as below :-
SAT_1.txt
SAT_2.txt
BAT_UD.lst
BAT_DD1.lst
DUTT_1.txt
DUTT_la.txt
Expected result :-
should get all the above file in $<Filename>_file.lst
Below is my code :-
for i in SAT BAT DUTT
do
touch a.lst
cd $datadir (1 Reply)
Discussion started by: satishmallidi
1 Replies
3. Shell Programming and Scripting
I used rm * and it deleted the files in the directory but gives and error message for unsuccessful subdirectory deletion.
"rm: cannot remove 'DirectoryName': Is a directory"
I dont want to explicitly get the above error.
What are the modifications I have to do in the rm command? (3 Replies)
Discussion started by: duplicate
3 Replies
4. UNIX for Dummies Questions & Answers
Hello all,
this is my first and probably not my last question around here. I do hope you can help or at least point me in the right direction.
My question is as follows, I need to find files and possible folders which are not owner = AAA group = BBB with a said location and all sub folders ... (7 Replies)
Discussion started by: kilobyter
7 Replies
5. Shell Programming and Scripting
I need a Shell script which take two inputs which are
1) main directory where it has to search and
2) pattern to search within main directory all files (.c and .h files)
It has to print number of pattern found in main directory & each sub directory.
main dir --> Total pattern found = 5
|... (3 Replies)
Discussion started by: vivignesh
3 Replies
6. UNIX for Dummies Questions & Answers
I would need a command for finding first 15000 of the file names whose 25th postion is 5 in the current directory alone.
I do have this painful command
find . -name '5*' | head -15000 | cut -c3-
please refine this.
Of course the above command also searches in the sub directories... (3 Replies)
Discussion started by: vk39221
3 Replies
7. Shell Programming and Scripting
Hello,
I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found.
For instance.
I can start the script with arguments for keyword and for value, i.e
script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies
8. Solaris
Hi,
I'm searching for a pattern 'java' under a directory but it is returning all the files containing 'java', but I want to have only distinct files not all.
please help (2 Replies)
Discussion started by: b.paramanatti
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have to copy a set of files abc* in /path/ to /path1/ as abc*_bkp.
The list of files appear as follows in /path/:
abc1
xyszd
abc2
re2345
abcx
..
.
abcxyz
I have to copy them (abc* files only) into /path1/ as:
abc1_bkp
abc2_bkp
abcx_bkp
..
. (6 Replies)
Discussion started by: new_learner
6 Replies
10. Shell Programming and Scripting
I have 20 files in a direcotry like BARE01_DLY_MKT_YYYYMMDD. The MKT differes for all these files but the remaining syntax remains the same for a particular day. If I am checking for today I need to make sure that there are 20 files that start with BARE01_DLY_MKT_20060720. How can I write a... (31 Replies)
Discussion started by: dsravan
31 Replies