Search Results

Search: Posts Made By: jacksolm
4,864
Posted By jacksolm
Now, I see the missing piece. I was missing the...
Now, I see the missing piece. I was missing the algorithm to remove an item from the middle of an array. In other words:

To delete an element from the middle of an array:

1. There is no need to...
4,864
Posted By jacksolm
Don, Thanks again for you assistance. I will...
Don,

Thanks again for you assistance. I will keep this in my toolbox. One last request if you would, please. Can you post a few comments/pseudo code explaining your approach to this problem? I...
4,864
Posted By jacksolm
Where is the genius button?! I was able to edit...
Where is the genius button?! I was able to edit the script and change the variables around( I typed in the example in the wrong format) and voila! Many thanks to you for your awk expertise! To...
4,864
Posted By jacksolm
Don, Sorry for the delay. I just had a...
Don,

Sorry for the delay. I just had a chance to try your solution. I had a few typos which resulted in syntax errors. After debugging, the script was able to execute. It is strange that awk...
4,864
Posted By jacksolm
Here's a little background information. Due to...
Here's a little background information. Due to group member limitations we had to split groups into separate lines by using different group names and identical GIDs. A few help desk admins...
4,864
Posted By jacksolm
Using sed, awk or perl to remove substring of all lines except the first
Greetings All,

I would like to find all occurences of a pattern and delete a substring from the all matching lines EXCEPT the first. For example:

1234::group:user1,user2,user3,blah1,blah2,blah3...
11,550
Posted By jacksolm
Scrutinizer, That worked like a charm! I...
Scrutinizer,

That worked like a charm! I made a few slight modifications to format reading from the group file and all is well.

Thanks to both you and Dude2cool for your time.
11,550
Posted By jacksolm
I will give that a try and let you both know the...
I will give that a try and let you both know the outcome. Thanks in advance for your time and assistance. This is a great website. I was amazed at the speedy response.
Thanks again!
11,550
Posted By jacksolm
So do you think the following would work? ...
So do you think the following would work?
oldIFS=$IFS
IFS=,
ypcat -k group | while IFS=: read group x x users
do
for user in $users
do
if (adquery group -a $group | grep $user) then
...
11,550
Posted By jacksolm
Scrutinizer, I was hoping that this would be...
Scrutinizer,

I was hoping that this would be useful in the comma delimited list of users resulting from the `ypcat -k group | grep $GROUP | cut -d":" -f4` output. Is there better way in bash to...
11,550
Posted By jacksolm
My apologies for the lack of clarity. I was...
My apologies for the lack of clarity. I was thinking it was an issue with the $GROUP variable within the inner loop "for statement"(grep $GROUP):

for USER in `ypcat -k group | grep $GROUP | cut...
11,550
Posted By jacksolm
Nested for loops
Greetings All,

The following script attempts to enumerate all users in all groups in the group file(GROUP) and echo the following information:

GROUP ---> USER

The script is as follows:

...
Showing results 1 to 12 of 12

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