10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
As part of a bash the below line strips off a numerical prefix from directory 1 to search for in directory 2.
for file in /home/cmccabe/Desktop/comparison/missing/*.txt
do
file1=${file##*/} # Strip off directory
getprefix=${file1%%_*.txt}
... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"
"Report.Dddmmyy.Thhmiss.ACCD"
"Report.Dddmmyy.Thhmiss.BCCD"
"Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
3. Shell Programming and Scripting
Hi,
I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement.
There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2
(Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (4 Replies)
Discussion started by: shadow_fawkes
4 Replies
4. Shell Programming and Scripting
Hi,
I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement.
There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2
(Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (1 Reply)
Discussion started by: shadow_fawkes
1 Replies
5. Shell Programming and Scripting
Hi,
need help in recognizing the pattern of file name. For e.g.
file name 1: <static file prefix>.<store cd>_<YYYYMMDD>.<ext>
file name 2: <static file prefix>_<YYYYMMDD>.<ext>
I want to know that there are 3 dots "." in the file name1 and one dot "." in file name2. How can I know... (3 Replies)
Discussion started by: dips_ag
3 Replies
6. Shell Programming and Scripting
Hi,
As a newbie, I'm desperate ro make my shell script work. I'd like a script which checks all the files in a directory, check the file name, if the file name ends with "extracted", store it in a variable, if it has a suffix of ".roi" stores in another variable. I'm going to use these two... (3 Replies)
Discussion started by: armando110
3 Replies
7. Shell Programming and Scripting
Hi all,
I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example:
... (2 Replies)
Discussion started by: cul8er
2 Replies
8. 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
9. Shell Programming and Scripting
I want a shell script that will traverse a file system starting at specific path.
And look at all file names for repeating sequences of and remove them from the file name.
The portion of the name that gets removed has to be a repeating sequence of the same characters.
So the script would... (3 Replies)
Discussion started by: z399y
3 Replies
10. UNIX for Advanced & Expert Users
Hi All,
Iam trying to find two kinds of files while ignoring rest of the files in a directory
The files are like below
Files to be found
--------------------
perp45560
oerp4556
Files to be ignored
----------------------
oerp4556123450
oerp4556123470
I was trying the following... (4 Replies)
Discussion started by: baanprog
4 Replies