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...
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
Question: How do I append text in the middle of a line in a text file? Let say, I have file foo.txt
>> echo foo.txt
line1.This.is;a.test /var/messages
line2.This is #a test
Now I would like to search in the file foo.txt for a string that contain "line1". Then append string...
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.