09-14-2016
Quote:
Originally Posted by
ncwxpanther
.
.
.
Note that all locations in file.txt (source input) should have at least 1 instance in *08-new.txt
.
.
.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to count the number of times a script is accessed from within the script. Is it possible ?
Example: I have a script called lo.sh and i execute the script for the first time, then the counter variable declared inside the lo.sh should increment by 1. For every execution the... (1 Reply)
Discussion started by: pathanjalireddy
1 Replies
2. UNIX for Dummies Questions & Answers
Some simple questions from a simple man.
If i wanted to count the number of files contained within a directory, say /tmp would ls -l /tmp ¦ wc -l suffice and will it be accurate?
second one: How would i check the number of files with a certain string in the filename, in the same directory.
... (2 Replies)
Discussion started by: iamalex
2 Replies
3. Shell Programming and Scripting
Hi Folks !!!!!!!!!!!!!!!!!!!
My Requirement is.............
i have a input file:
501,501.chan
502,502.anand
503,503.biji
504,504.raja
505,505.chan
506,506.anand
507,507.chan
and my o/p should be
chan->3
i.e. the word which occurs maximum number of times in a file should be... (5 Replies)
Discussion started by: aajan
5 Replies
4. Shell Programming and Scripting
hi all,
i'm trying to pass a count of files to a variable thru these set of codes:
sh_count=$(ls -1 fnd_upload_LV*.* |wc -l)
problem is if no files matches that, it will give an error "ls: fnd_upload_LV*.*: No such file or directory".
how do i avoid having the shell script show that... (2 Replies)
Discussion started by: adshocker
2 Replies
5. UNIX for Dummies Questions & Answers
I am looking for a bash command that counts the number of times a character appears in a file. For example "I am a newbie, trying to learn shell script". Then the command counts the number of e and gives them as 4. Also I want one that counts the number of times a character in a string is replaced.... (2 Replies)
Discussion started by: #moveon
2 Replies
6. Shell Programming and Scripting
I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish.
And this is... (2 Replies)
Discussion started by: Shingoshi
2 Replies
7. Shell Programming and Scripting
Hi,
The tag can occur multiple times.
I want to remove entire <SeqNum>..</SeqNum> from each line, regardless the values with in this tag. for each line value inside these tags could be different. So please suggest how to do this.
Note: Each profile information is in one line.
... (2 Replies)
Discussion started by: Anusha_Reddy
2 Replies
8. UNIX for Dummies Questions & Answers
Is there a way to read how many times each result occurs in a list,
say the list.txt has the results:
a
c
d
a
f
c
a
d
e
and I need to know how many times each of them occurs such as :
a=3
c=2
..etc. (5 Replies)
Discussion started by: Iifa
5 Replies
9. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Develop a shell script that accepts a phrase and counts the number of times that it is repeated in a specific website.
Note: Im not sure if it's the whole website, or just a specific page but im guessing its thewhole website.
... (2 Replies)
Discussion started by: Zakerii
2 Replies
10. Shell Programming and Scripting
Hi,
My Input File :
"MN.1.2.1.2.14.1.1" :=
"MN_13_TM_4" ( 000000110110100100110001111110110110101110101001100111110100011010110111001 )
"MOS.1.2.1.2.13.6.2" :=
"MOS_13_TM_4" ( 000000110110100100110001111110110110101110101001100111110100011010110111001 )
Like above template,I have... (4 Replies)
Discussion started by: Preeti Chandra
4 Replies
ZGREP(1) General Commands Manual ZGREP(1)
NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci-
fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and
fed to grep.
If zgrep is invoked as zegrep or zfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, zgrep uses
it as the grep program to be invoked. For example:
for sh: GREP=fgrep zgrep string files
for csh: (setenv GREP fgrep; zgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO
grep(1), egrep(1), fgrep(1), zdiff(1), zmore(1), znew(1), zforce(1), gzip(1), gzexe(1)
ZGREP(1)