You don't need to use find, ls, grep, or globbing at all. Your use of grep is wrong anyway since grep uses regular expressions, not globbing -- "fileone*" matches "fileon", then one or more e's. and does so anywhere in the line, so "aaaaaafileon" would match "fileone*".
The shell has many operators for use inside [ ] which can be used to check files, directories, or variables in many ways, see man test.
I'm getting an error "too many files open"
# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 256
memory(kbytes) unlimited
#
hard limit shows 1024
I would like to know how many files... (1 Reply)
Hi all,
I know how to count lines, count byte of a file, but really dont know how to compare line , I am newbie and hope you can help me to learn more about UNIX.
Here is my problem.
====
How :
1. File A (Flatfile with NAME|DATE|ID1|ID2|ID3|ID4|ID5)... (3 Replies)
I'm trying to check whether 3 files are existing and send 3 files as attachements.
If only two are there then send those two files as attachments.
if ; then
elif ; then
I tired the above given syntax and then it is giving me an error
line 11: '
I tried with -a instead of && and... (3 Replies)
Hi,
I am a newbie to shell scripting. here is my objective:
1)The shell program should take 2 parameters - ie-> DestinationFolder, WebFolder
2)Destination folder contains few files that has to has be verified and deleted.
3)WebFolder is a folder containing a list of master files
4)It... (1 Reply)
Hi,
I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is
# echo $0
-sh
My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Hi Experts,
I am checking how to get day in Perl.
If it is “Monday” I need to process…below is the pseudo code.
Can you please prove the code for below condition.
if (today=="Monday" )
{
while (current_time LESS THAN 9:01 AM)
... (1 Reply)
Hi all,
I have 2 files in which i have to find commom entries in column 1 an dif soemthing is common write other data of both files in front of it mentioned.
Gene symbol and disease name
column 1 column2
ARFGEF2 CAD
DDEF2 CAD
PSCD3 CAD
PSCD4 CAD
CAMK1... (15 Replies)
Hi,
I have to check the files in another server using sftp to do that, below is the code i am going with
#!/bin/bash
export SRC_FOLDER=$1
export ARC_FOLDER=$2
HOST=as07u3456
USER=relfag
sftp ${USER}@${HOST} <<EOF
cd $SRC_FOLDER/DSCOR
ls
bye
EOF
echo "done"
whatever the files i... (8 Replies)
unzip -v gives CRC info of each file in a zip(in my case .EAR) file.
# unzip -v my-application.ear
Archive: my-application.ear
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies
LEARN ABOUT MINIX
zgrep
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 invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, 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 the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)