10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
As an exercise, I'm trying to re-write this code without the compound square brackets, using grep and test. Need to know what to do about the "equal-tilde".
# test-integer2: evaluate the value of an integer.
if +$ ]]; then
if ; then
echo "INT is zero."
if ; then... (17 Replies)
Discussion started by: Xubuntu56
2. UNIX for Beginners Questions & Answers
I want to xheck if a file exists that uses wildcards as only the partial filename is known using the test Command, and when it exists then output just the number of lines in the file... do not include the filename. Then this output, is it captured by the CommandOutput or the ReturnValue as I want... (2 Replies)
Discussion started by: dsinco
3. Shell Programming and Scripting
I have a list of files like below, Do we have grep command to find files?
If i grep 03874 it should display the file 3874, Grep command should ignore 0 at the beginning. There could be more many leading 0's in filename.
$ ls -ltr
-rw-r--r-- 1 mqm mqm 15 Feb 19 17:07 4769... (3 Replies)
Discussion started by: prince1987
4. Shell Programming and Scripting
Data Format: ASCII with carriage returns and linefeeds
GZIP Bytes: 36893068
Unzipped Bytes : 613794510
Record Length: 738
Data... (16 Replies)
Discussion started by: dotran
5. Shell Programming and Scripting
working on Solaris 10 in ksh.
Basicly, in my function, i'm trying to test that all my unix cmd's are true (exit status 0) else you flag the rcControlRule to 1 without going into spagetti mode code testing every $? in a if statement.
The mdb is probably a little tricky cause it... (3 Replies)
Discussion started by: maverick72
6. Shell Programming and Scripting
-rwxr-xr-x 1 kmani00 system 9 Nov 08 03:29 tempfile.txt
-rwxrwxrwx 1 kmani00 devgrp 0 Nov 08 03:32 testfile.txt
by exec the following command, i did not get any output.
> test -s tempfile.txt
> a=`test -s tempfile.txt`
> echo $a
by exec the... (4 Replies)
Discussion started by: kmanivan82
7. Shell Programming and Scripting
I am stuck on this part, I have a loop with processes an operations file.
and calls different functions depending on what is in loop, which processes a database file...
#so far my add function works as intended
# delete is kinda working... (13 Replies)
Discussion started by: gcampton
8. Shell Programming and Scripting
I want to use grep inside a test statement, but I am getting an error message.
echo $testvarNum | grep *
The result of this is as follows:
However, when I try the following (i.e. to test if the variable is numeric or non-numeric):... (3 Replies)
Discussion started by: dkieran
9. Shell Programming and Scripting
Okay, well this is more or less my first attempt at writing a shell script.
Anyways, here's my code:
Anyways, it's a pretty simple script that is supposed to search for the... (4 Replies)
Discussion started by: cbo0485
10. Shell Programming and Scripting
I need to seach all strings that matches "if ; then" in all files
If i put
grep "if ; then" *.* it is not giving any result (1 Reply)
Discussion started by: pmsuper