Search Results

Search: Posts Made By: ericelysia
6,073
Posted By ericelysia
Thanks
I feel like a big dummy.

Thanks for pointing that out. That took care of my problem. I will continue practicing.

Thanks,
Eric
6,073
Posted By ericelysia
Data Validation
Hello,

I am trying to use data validation with a program. I have everything else working fine. I just can't figure out what I am doing wrong with the data validation in one of my files. Here is...
6,276
Posted By ericelysia
I haven't learned anything about calculating with...
I haven't learned anything about calculating with UNIX.

I will give it a go and let you know.

Thanks,
Eric
6,276
Posted By ericelysia
Is there a way to use the record number that is...
Is there a way to use the record number that is input by the user?

I initially was thinking:

sed -n -e '1,${number - 1}p' phonebook > tmp

But I am thinking this works like C++ or Java. I...
6,276
Posted By ericelysia
The following does work: # Remove the record...
The following does work:

# Remove the record with the record number using sed.
sed -e "${number}d" phonebook > tmp
mv tmp phonebook
chmod 755 phonebook


# Add the fields back into the file....
6,276
Posted By ericelysia
Yes, that was a typo. I used chmod before...
Yes, that was a typo.

I used chmod before when removing records, so I was under the impression that it would be similar.

Eric
6,276
Posted By ericelysia
OK, I understand the idea. Is there a way for me...
OK, I understand the idea. Is there a way for me to use the record number that was previously entered by the user (the code in my last post)?


Here's what I just tried, but it completely...
6,276
Posted By ericelysia
I have made some modifications using some basic...
I have made some modifications using some basic commands. I want to allow the user to change a record.


cat<<here

Please enter the record number of the particular record to change:

here
...
6,276
Posted By ericelysia
I figured it out without a select statement. ...
I figured it out without a select statement.

Thanks,
Eric
6,276
Posted By ericelysia
The records start on line 25. What I would like...
The records start on line 25. What I would like to do is to be able to number the records to help narrow down the initial search. For example, if 2 records show up with the same first name, I would...
6,276
Posted By ericelysia
grep sed
OK, I am trying to become more familiar with grep and sed.

I have a file that is storing some records. I am allowing a user to
search for a keyword in the file with this:

grep -i "$keyword"...
9,576
Posted By ericelysia
I assume you are referring to the variables with...
I assume you are referring to the variables with the tput options.

The program is not really connected right now, it is in separate files.

Is it still possible to only declare them in one file...
9,576
Posted By ericelysia
I've made progress!
Hello,

I've made some progress, but have a few questions.

Is there a way to read in user input inside a Here Document?

The last line of the add(draft) file is supposed to redirect the...
9,576
Posted By ericelysia
Teaching myself Here Document
I understand that a Here Document will redirect all of the lines between the beginning marker for the here document and the ending marker into the command specified just as if the text were coming...
23,082
Posted By ericelysia
Grateful!
I agree that the road is long (and probably bumpy), but with support from people like yourself and those here who have used some of their personal time to give me a nudge, I don't think I'll be...
23,082
Posted By ericelysia
OK, I don't know why I was making that more...
OK, I don't know why I was making that more complicated than it is.

I was letting the "not" confuse me.

Now I understand.

Thank you,
Eric
23,082
Posted By ericelysia
-z string True if the length of string string...
-z string
True if the length of string string is zero.

So the statement above is saying,
if[ the length of string string is not zero]

Am I understanding this correctly? Is that really what...
23,082
Posted By ericelysia
I had the whitespace in the first time I tried...
I had the whitespace in the first time I tried it. I took the whitespace out to see if that made a difference, but it did not make a difference.



Ah ha. Thank you!


OK, that makes sense....
23,082
Posted By ericelysia
OK, after reading the linked lesson (Lesson 13:...
OK, after reading the linked lesson (Lesson 13: Positional Parameters), I have written a test program. This program is called "positional_parameters":

set -vx

set

echo "Positional...
23,082
Posted By ericelysia
That's good to know. Thanks for the...
That's good to know.

Thanks for the clarification.

Eric
23,082
Posted By ericelysia
1. Are initialized by shell They are not...
1. Are initialized by shell
They are not initialized by the shell. Rather they pick up the values from the arguments passed to a shell script.

I am not sure I completely understand this.

For...
23,082
Posted By ericelysia
Positional Parameters
Hello,

I am using the Bourne shell.

I am trying to understand the concept of positional parameters.

I do understand that positional parameters:

1. Are initialized by shell
2. Have a...
Showing results 1 to 22 of 22

 
All times are GMT -4. The time now is 09:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy