10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have prepared a shell script to find the duplicates based on the part of filename and retain latest.
#!/bin/bash
if ; then
mkdir -p dup
fi
NOW=$(date +"%F-%H:%M:%S")
LOGFILE="purge_duplicate_log-$NOW.log"
LOGTIME=`date "+%Y-%m-%d %H:%M:%S"`
echo... (6 Replies)
Discussion started by: gold2k8
6 Replies
2. UNIX for Advanced & Expert Users
I have a source file which is something like :
C/*M/ / ***HMACCT ** MONTH FOR CURRENT MINUS 14 CAL DAY
C/*D/ / ***HMACCT ** DAY FOR CURRENT MINUS 14 CAL DAY
C/*X/ / ***HMACCT ** CENTURY FOR CURRENT MINUS 14 CAL DAY
C/*Y/ / ***HMACCT **... (5 Replies)
Discussion started by: gotamp
5 Replies
3. Shell Programming and Scripting
Hi all,
I have written a wrapper script in Perl which will be used on AIX, Linux and Windows and I do not want to change any code for the needs for a specific OS if avoidable.
It works fine so far on all 3 OSes, not blowing up any stacks any more, but I am unsure how to handle writing log files... (7 Replies)
Discussion started by: zaxxon
7 Replies
4. Shell Programming and Scripting
i have a script in which i need to skip comments, and i am able to achieve it partially...
IN text file:
{****************************
{test : test...test }
Script:
while (<$fh>)
{
push ( @data, $_);
}
if ( $data =~ m/(^{\*+$)/ ){
}
With the above match i am... (5 Replies)
Discussion started by: avskrm
5 Replies
5. Shell Programming and Scripting
Is there any equivalent of the below requirement in perl
fgrep -f file1 file2 > file3 (2 Replies)
Discussion started by: aravindj80
2 Replies
6. Shell Programming and Scripting
Hi,
i am using fgrep command with following syntax
fgrep -v -f pattern_file_name file
file contains few line and have the pattern which i am giving in pattern file.
My Problem is :
its is not giving any output.
while i am using fgrep -f pattern_file_name file
it is showing all... (4 Replies)
Discussion started by: emresearch
4 Replies
7. Shell Programming and Scripting
#!/bin/bash
perl -nle'
/(?:date|time|ref)/ and print join " ", /(?:date|time|ref)+/g
or print
' inputfile
Problem I have is that I want to delete words that are on the line of the 3 words above (date, time, and reference). However, I do not want to delete the words... (9 Replies)
Discussion started by: linuxkid
9 Replies
8. Shell Programming and Scripting
How can we use fgrep command to search pattern on perticular field on a file.
eg : I have a parren file having format
cat patternfile
SPA16S199982
SPA5S26330
I want to seach these pattern on FIRST field of File2(since other field has
same data) and that too maching entirely.
... (10 Replies)
Discussion started by: morbid_angel
10 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Can I know the usage of fgrep -f command in kshell.
Reqirement: Need to search for list of patterns in list of files and display all the files which are having atleast one in the patterns list.
I hope fgrep -f will serve this purpose within a loop. But I am not successfull in doing this.... (0 Replies)
Discussion started by: divv
0 Replies
10. Shell Programming and Scripting
Hi, everybody.
I just wonder whether there are a couple of free Linux servers running as terminals where people can practice Unix Shell Programming?
I'd like to set up one myself but unfortunatly can't do it. I can't switch to Linux now coz I run a couple of servers on my machine.
Cygwin is... (3 Replies)
Discussion started by: belgampaul
3 Replies