I have to find out the file system location of the script file inside script. for example a script "abc.sh" placed anywhere in the file system when executed shold tell by itself the location of it.
example
#pwd
/
#./abc
this is /
#cd /root
#./abc
this is /root
#cd /
#/root/abc
this... (10 Replies)
hi gurus,
I am having a file containing a list of tables.i want to find the count of records inside thes tables.
for this i have to connect into database and i have to put the count for all the tables inside another file i used the following loop once all the tablenames are inside the file.
... (1 Reply)
Hi
I have a directory with two subdirectories and also have a code like below to search files modified in last 2 minutes.
# ls
hello080909.txt inbox outbox
# find . -type f -mmin +2
./inbox/hello2080909.txt
./outbox/hi0080909.txt
./hello080909.txt
The above code just searches and... (3 Replies)
Hi ,
Is there any way i can find a file with specific word inside it.
For example if i want to find a file which has some text written inside it.
How would i form a command to search them? (3 Replies)
hello everybody,
I have a group of file
eg-
sample1
sample2
sample3
sample4
each file contain this :-
cat sample1
SEQ_NUM,1,UPESI1
My requirement is to
change the value-UPESI1 to UPE10 in file which contain this pattern -UPESI1.
any help is appreciated. (2 Replies)
Suppose i have a word "mail".
I have to search this word in all files inside a directory and it's sub-directories.
It will also search in all hidden directory and sub-directories.
If it finds this word in any file it will list that file.
How can i do this with perl/ruby/awk/sed/bash or... (9 Replies)
Hi,
I wanna find the biggest number inside of a file
this is kind of example of file:
9
11
55
then i just wanna print out the biggest number
i had try sed filenale | sort -k1,1n | paste -s -d',' -
but i had no success ... (7 Replies)
Hi am using Unix AIX Ksh
have a FILE
CAT FILE
08/02/2013
16/02/2013
18/02/2013
I need the Outputs as
Missing date are 09/02/2013 to 15/02/2013,17/02/2013
can anyone help me !!! (1 Reply)
Hi All,
I need to write a script to find all "*.sh" files in /home file system and if any string find "*.sh" files with the name vijay@gmail.com need to replace with vijay.bhaskar@gmail.com. I just understood about the find the command to search .sh files. Please help me on this.
find / -name... (3 Replies)
Discussion started by: bhas85
3 Replies
LEARN ABOUT CENTOS
lzgrep
XZGREP(1) XZ Utils XZGREP(1)NAME
xzgrep - search compressed files for a regular expression
SYNOPSIS
xzgrep [grep_options] [-e] pattern file...
xzegrep ...
xzfgrep ...
lzgrep ...
lzegrep ...
lzfgrep ...
DESCRIPTION
xzgrep invokes grep(1) on files which may be either uncompressed or compressed with xz(1), lzma(1), gzip(1), bzip2(1), or lzop(1). All
options specified are passed directly to grep(1).
If no file is specified, then standard input is decompressed if necessary and fed to grep(1). When reading from standard input, gzip(1),
bzip2(1), and lzop(1) compressed files are not supported.
If xzgrep is invoked as xzegrep or xzfgrep then egrep(1) or fgrep(1) is used instead of grep(1). The same applies to names lzgrep, lze-
grep, and lzfgrep, which are provided for backward compatibility with LZMA Utils.
ENVIRONMENT
GREP If the GREP environment variable is set, xzgrep uses it instead of grep(1), egrep(1), or fgrep(1).
SEE ALSO grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zgrep(1)Tukaani 2011-03-19 XZGREP(1)