I am new to perl and need help with this quetion. from machine A, I log into machine B. How do I from machine A open a terminal on machine B and execute command "pwd"?
What perl module i should use? please help
Thanks
Hi all,
We want to have a build automation using VBscript and MS Visual Studio. Can some one share what they have or please point me to a place to learn how to do it?
Thanks
CAn't find it through search. I can't
Can someone please show me how to steup an automation build for VC++ IDE? either perl/vb or command line or VC++ API? I am tasked to work on it but dont know where to start, so i start here. Please help
Thanks
Hi,
Please help me to write an awk or sed statement that do:
1. if see any line that started with "local0." (local0 follow by a dot) replace the entire line with "local0.debug /var/test"
2. If I dont see any line that started with "local0." append "local0.debug /var/test" to the file
here...
hi, I want to add a line to file new.log if /var/log/new.log is not presented in the file.
But it add:
$A_STRING /var/log/new.log
instaed of
local0.debug /var/log/new.log
#!/bin/sh
A_STRING=local0.debug
awk '/\/var\/log\/new.log/{++n}{print}END{if(!n)print "\n$A_STRING...
Thanks a lot it work perfectly.
I want to enhance this script so that if string ";none" not presented before the "Tab" then add it. If it's already there then dont add it. How do I check in this statement?
sed -e '/\*.info/bl1' -e '/\*.warning/bl1' -e '/\*.notice/bl1' -e '/\*.err/!b' -e ':l1'...
Hi PHV,
I try it and it say "sed: -e expression #1, char 40: Extra characters after command"
here is the file.txt
*.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages
*.err;mail.none;news.none;authpriv.none;cron.none /var/log/message
Please help
Thanks
I want to search a text file for any line that has "*.info" or "*.err", If i found it I insert the string ";none" before the 'tab'.
I sucessfully do either "*.info" or "*.err" but dont know how to do both on the same line. Please help. How do I put a 'or' statement in the below line to also...
I want to do the following but have no clue. Please suggest.
1) I want to search in a file "config.txt" for a line that started with "*" follow by anything, then "LOG" then "one or more tab" then /var/log (ex: *124adfadf;*LOG /var/log). If I found this line I want to remove "LOG" and save...
hi,
How do I do this?
i want to search entire file foo.txt for string that started with "*one;twothree". Then see if that string contain string "FOO" or not. if Not Replace the first white-space with "FOO"
sed '/"*one;twothree/[HOW DO I CHECK FOR FOO HERE]s/ /FOO /' foo.txt
thanks
#!/bin/sh
IP_ADDRESS=`/sbin/ifconfig | grep inet`
ex: the $IP_ADDRESS now is: " inet Ip: Mask:"
How do I remove the all the white-space at the begining of $IP_ADDRESS if any line before move on to the next statement? so that $IP_ADDRESS will become "inet Ip: Mask:"
thanks
Wow... Cool it's a tab not a space. So how do you replace a tab. I try \t but it doesnt wotk. it replaces the t instead of a tab. Sorry, I am a newbie and is learing this stuff. Thanks a lot
sed '/info;mail/s/\t/GOT.IT /' foo.txt
info;mail.none;auGOT.IT hpriv.none;cron.none...
Hi, Please help me why it doesn't work for me. Thanks
linuxbuild : /home/g2345c >sed '/info/s/ /GOT.IT /' foo.txt
info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.*...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.