Search Results

Search: Posts Made By: The Gamemaster
3,916
Posted By MadeInGermany
One comment: assuming there is embedded sed...
One comment:
assuming there is embedded sed code, then
's/^syslogd.*$/&\n*ACTION \/etc\/init.d\/syslog start/'
substitutes the current line by itself plus a new line.
This is the same as...
3,916
Posted By MadeInGermany
The following file has another separator at the...
The following file has another separator at the end of the command field
RHEL:syslogd:sed -i '/^syslogd/ a*ACTION /etc/init.d/syslog start/' $CFG_DIR/ps_mon.cfg:
RHEL:ntpd:"sed -i '/^ntpd/ a*ACTION...
3,916
Posted By bakunin
For this kind of situations there is the eval...
For this kind of situations there is the eval keyword. Its use is always the last resort, so this is not a "recommendation" and the advice is to handle it with extreme care.

Since you don't show...
3,916
Posted By Chubler_XL
You might have more success in using awk in...
You might have more success in using awk in filter your control file.

Slight change in format of control file:

RHEL apple
echo apple
RHEL bravo
ls -l bravo*
RHEL church
chmod...
3,916
Posted By bakunin
Ok, let us start with the easy part: the most...
Ok, let us start with the easy part: the most basic thing you have to take care of is the difference between these systems: HP-UX has (IIRC) a Korn Shell as default shell, some Linux systems (sorry,...
3,916
Posted By RudiC
Enclose the $line in double quote to have the...
Enclose the $line in double quote to have the shell preserve spaces within.

But, I may be thick-witted, but the entire problem escapes me, even with the new sample.
OK, you have the OS - however...
6,427
Posted By Yoda
First of all check if these are symbolic links. ...
First of all check if these are symbolic links.

By default find command does not follow if it is a symbolic link.

You have to use -follow option which causes find to follow symbolic links:...
6,427
Posted By alister
That use of -follow has no effect whatsoever...
That use of -follow has no effect whatsoever since no symbolic link occurs after it. Not all find implementations support -follow, and it's deprecated for those that do.

If you are correct and the...
2,120
Posted By CarloM
Try file_name=`awk -F, -vextract=$file_count...
Try
file_name=`awk -F, -vextract=$file_count -vcomp=$component '$1 ~ comp { print $extract }' list.txt`
2,570
Posted By Klashxx
With perl: perl -p -e...
With perl:
perl -p -e 's/(RUNCYCLE)(\s\S+)/\1/g' infile
2,570
Posted By Franklin52
With sed: sed 's/RUNCYCLE [^ *]*/RUNCYCLE/g'...
With sed:
sed 's/RUNCYCLE [^ *]*/RUNCYCLE/g' file
Showing results 1 to 11 of 11

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