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. 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
3. Shell Programming and Scripting
time="north_south_east_west_08:00" location="A" start="left" status="ok" end="north"
time="north_south_east_west_12:00" location="C" start="right" status="ok" end="south"
time="north_south_east_west_23:00" location="G" start="left" status="ok" end="east"... (7 Replies)
Discussion started by: ctphua
4. Shell Programming and Scripting
Hi all. I am trying to compare and filter two files. I have a bigfile.txt of names and ids and a smallfile.txt of ids only. What I am trying to do is use a while read loop to read the ids in the bigfile and then echo the name and id only if the id exists in the small file. Basically, I'm trying to... (5 Replies)
Discussion started by: jameswatson3
5. 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
6. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
if test $a = stop
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
7. 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
8. UNIX for Dummies Questions & Answers
Hello, i have a script which checks if the user entered 8 numeric characters in the form of YYYYMMDD (birth date). If the user entered any non numeric characters, an error will be displayed:
# Check to see if the 8 characters are all numbers
# If not show error essage
# And prompt user... (4 Replies)
Discussion started by: netmaster
9. UNIX for Dummies Questions & Answers
I need to know if I have got the following grep command correct. I wanted to find from myfile.txt all signed real numbers (e.g. +5.0, -78, but not 5.0, 5 are not).
I have thought about it and decided it was this:
grep '' myfile.txt
but I was wondering if this was correct. If... (2 Replies)
Discussion started by: rushhour
10. 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