Search Results

Search: Posts Made By: bludhemn
1,008
Posted By bludhemn
Thanks, this will echo to first line, but it...
Thanks, this will echo to first line, but it doesnt stay there when the screen starts scrolling with the output from tar.
1,008
Posted By bludhemn
Method to display a line at the top always, regardless of stdout
Hi

Is there way to, say, echo a line and make sure it is always displayed on the first line, no matter what is coming out on stdout?

eg:


#!/bin/bash
clear
echo " ...... Internal audit...
1,267
Posted By bludhemn
Trying to search for a string and append text only once
Hi

I am trying to search for a particular occurrence of a string in a file, and if found, append another string to the end of that line.

Here is my file contents:

column1 userlist ...
2,311
Posted By bludhemn
Oh sorry, I thought it was clear from my 1st post...
Oh sorry, I thought it was clear from my 1st post that I was trying to search for multiple strings (of which one was defined ..$D)!!




Dint know this one, Thank you!




Can you explain...
2,311
Posted By bludhemn
Thank you for clearing this. I tried with...
Thank you for clearing this.

I tried with this
[ "`cat testfile | grep -w "$D"`" ]

and it worked too.

I am also trying at a later stage to get multiple grep conditions checked. Such as ,...
2,311
Posted By bludhemn
Searching for a specific string in a file
Hi

I am trying to search for a certain set of patterns within a file, and then perform other commands based on output.

testfile contents:
password requisite pam_cracklib.so lcredit=-1...
998
Posted By bludhemn
This worked. Thank you!
This worked. Thank you!
998
Posted By bludhemn
Searching for an entry and deleting the line
Hi

Im trying to scan a file for certain entries and remove their corresponding lines completely. What I have now is this,

for USER in user1 user2 user3 user4
do
sed '/$USER/d' /etc/sudoers...
3,751
Posted By bludhemn
Yes, they work with or without the "--" before...
Yes, they work with or without the "--" before the variable.

Thanks again
3,751
Posted By bludhemn
This worked...thank you!! I tried...
This worked...thank you!!




I tried this, enclosing the --md5 as you suggested.

This is the output
grep: '[-]-md5': No such file or directory
grep: xyy.: No such file or directory
...
3,751
Posted By bludhemn
Trying to grep for '--' occurance
Hello

Im trying to grep for a string in grub.conf . I've used the -F option since its a long string, but when i execute, i run into errors. Script and output below.

GRUBPASSWD="password --md5...
Showing results 1 to 11 of 11

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