Search Results

Search: Posts Made By: snag49ers
2,960
Posted By snag49ers
Using regex in sed to validate the length of an entry
I'm having trouble using sed to validate the length of an entry. I want to have a user enter a phone number of either length 7, 10 or 11. Only numbers are allowed. Does anyone know how to do this?...
Forum: Programming 04-17-2010
18,081
Posted By snag49ers
changing text color in c
I'm writing my own Unix ls command in c and I was wondering if anyone knows how to or can point me to a tutorial that shows me how to change the text color of the filename depending on if it's a...
Forum: Programming 04-11-2010
4,361
Posted By snag49ers
Sorry Corona, you are right. I didn't realize...
Sorry Corona, you are right. I didn't realize that I was scanning the wrong directory. The directory only had two hidden files and they were . and .. and I don't display those. Thanks.
Forum: Programming 04-10-2010
4,361
Posted By snag49ers
Listing hidden files
I'm writing a c program to list the files in a given directory but I also want to display the hidden files. I can't figure this out in c. Does anyone know how to do this? Here's the code I have so...
Forum: Programming 04-09-2010
45,226
Posted By snag49ers
Thanks itkamaraj. The problem I'm having now...
Thanks itkamaraj. The problem I'm having now though is that I am scanning the directory so the file that I'm using is stored in entry->d_name and when I call system("md5sum entry->d_name") it is...
Forum: Programming 04-09-2010
45,226
Posted By snag49ers
Computing an MD5Sum in C
Is it possible to call the unix command md5sum from within a C program. I am trying to write a C program that scans a directory and computes the MD5Sum of all the files in the directory. Whenever I...
1,936
Posted By snag49ers
Making a sort error
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

I need to...
1,446
Posted By snag49ers
Sorry. This shouldn't have been posted here. I...
Sorry. This shouldn't have been posted here. I actually have figured out the answer. Can you delete this post?
1,446
Posted By snag49ers
Redirection Question
I just wondered if I'm understanding this command line correctly

cat 2>save1 0<memo | sort 2>save2 1>letter


This means that stdin will read from memo and if there is an error then stderr will...
13,250
Posted By snag49ers
Thanks Alister. I went ahead and used the grep...
Thanks Alister. I went ahead and used the grep and cut. I knew how to do that one but I just wondered if you could use sed. Portability is definitely an issue and I don't have GNU sed so I can't...
13,250
Posted By snag49ers
Ignoring case in sed search
I am getting a parameter from a user and I need to use it to search and return the matching line numbers in a file. I am using this code:


recordNumber="$(sed -n '/'"$entry"'/{
=
d
}'...
22,086
Posted By snag49ers
Thanks Jim. Definitely appreciated. Bill
Thanks Jim. Definitely appreciated.

Bill
22,086
Posted By snag49ers
Copy Files to Dir and Check If File Exists
Hi everyone. I am trying to write a bash script that will copy files from one directory to another but I need to be able to check the directory that I'm copying the files to and see if the file...
Showing results 1 to 13 of 13

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