Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: chakrapani
620
Posted By chakrapani
I am assuming has values Berty adm, dialout,...
I am assuming has values Berty adm, dialout, cdrom, foo, foo


a simple grep should get you

echo $groups | grep dialout


with awk
echo $groups | awk '/dialout/{ print $0 }'
1,290
Posted By chakrapani
Have tried with xmllint command easier to handle...
Have tried with xmllint command easier to handle XML files.



You need an header line
CLI_RMOD_ACL^Mo,activeCellsList,activeCellsList,antennaPathDelayMeasurementCapableand then...
873
Posted By chakrapani
Is ssh slow ? #!/usr/bin/expect -f...
Is ssh slow ?



#!/usr/bin/expect -f set timeout 120 spawn ssh -o StrictHostKeyChecking=no user@xx.xx.xx.xx rpm -qa expect "word:" send -- "xxxx\r"
expect -exact "\r
sleep 10
expect "$" ...
2,425
Posted By chakrapani
May be add few steps like take a backup of file....
May be add few steps like take a backup of file. and validate file.

First to make backup

[ ! -d "/root/fstab_backup" ] && mkdir /root/fstab_backup
cat /etc/fstab >...
1,090
Posted By chakrapani
Some of the things Did you check with...
Some of the things



Did you check with cron logs?
$ tail /var/log/cron
What is the exit code of your script ? (pseudo code below)
0 0 * * * (./script_waits_4hrs_then_fails.sh ) && ( mail...
6,386
Posted By chakrapani
I made a named pipe and seems very close to...
I made a named pipe and seems very close to getting my solution of garbing HTTP headers, Also noticed my browser does not Always send all the header each time.
(Chrome Version 54.0.2840.99 even in...
6,386
Posted By chakrapani
Netcat ( nc -l ) as webserver
Dear Linux guru's

I am trying to create a webserver using nc (netcat only) on RHEL 7.2 running on bash shell.

now the easy thing is to get nc listing to a port and respond back

$ while...
4,395
Posted By chakrapani
Can you use File::Copy module ? use...
Can you use File::Copy module ?


use File::Copy;
copy("sourcefile","destinationfile") or die "Copy failed: $!";
6,262
Posted By chakrapani
find $INBOUND_PATH -size 0 -print | xargs ...
find $INBOUND_PATH -size 0 -print | xargs

or use -s : file is not zero size

using awk with $5 is not the safe way
Forum: Solaris 09-14-2016
4,898
Posted By chakrapani
can you try $ date --date="2 day...
can you try

$ date --date="2 day ago"
2,747
Posted By chakrapani
if you are looking for a loop then you could use...
if you are looking for a loop then you could use a quick 'for' loop in the directory where match.pl file is present.



./match.pl -f 9464294024_R01C01header -g 9466656017_R01C01header -k 1 -l...
13,088
Posted By chakrapani
This article data recovery - Unix/Linux...
This article

data recovery - Unix/Linux undelete/recover deleted files - Unix & Linux Stack Exchange (http://unix.stackexchange.com/questions/80270/unix-linux-undelete-recover-deleted-files)
...
937
Posted By chakrapani
@RudiC: Thanks for that it works perfectly.
@RudiC:
Thanks for that it works perfectly.
937
Posted By chakrapani
my requirement is: file.txt can have lines...
my requirement is:

file.txt can have lines starting with either A,I,X,W,C,P, ignoring header line starting with H at the beginning of the file
and footer line starting with E at the end of file....
937
Posted By chakrapani
Extract between lines starting with and
I have a combination of patterns to search.

file.txt contains below:
H2016-02-10
A74867712
I1556539758
Xjdflk534jfl
W0000055722327732
W0000056029009389
A74867865
I1556536434...
7,178
Posted By chakrapani
Xpath can be used like // till pattern ...
Xpath can be used like // till pattern ...
4,378
Posted By chakrapani
Got it ... Thanks
Got it ... Thanks
2,645
Posted By chakrapani
Found this thread devices - USB...
Found this thread

devices - USB connect/disconnect notification - Unix & Linux Stack Exchange (http://unix.stackexchange.com/questions/116536/usb-connect-disconnect-notification)

From the...
4,378
Posted By chakrapani
i tested same log (copy paste) and -f option and...
i tested same log (copy paste) and -f option and it worked for me with space.

on FreeBSD with /usr/bin/cut
4,092
Posted By chakrapani
I am not sure but there should be spawn to call...
I am not sure but there should be spawn to call command



#!/usr/local/bin/expect
spawn su -
expect "Password:" { send "passwd\r" }
expect "# " { send "uname -a\r" }
expect "# " { send...
7,178
Posted By chakrapani
I have used xmllint with huge files xmllint...
I have used xmllint with huge files

xmllint --format hugefile.xml >> hugefile_formatted.xml

to get formatted or use --shell option to get you values using xpath.
4,378
Posted By chakrapani
1. Date range of the log. Hope they are sorted ...
1. Date range of the log. Hope they are sorted

Check the manual page for cut using

$ man cut


cut -f
-f list
The list specifies fields, separated in the input by the...
7,178
Posted By chakrapani
Option for sel (select) is using xpath. ...
Option for sel (select) is using xpath.

What is Xpath ? May be you might get some basics from URL:
XPath Tutorial (http://www.w3schools.com/xsl/xpath_intro.asp)


bash-2.03$ xml
XMLStarlet...
3,237
Posted By chakrapani
Can you check perl version. I am assuming no perl...
Can you check perl version. I am assuming no perl modules are installed

---------- Post updated at 12:41 PM ---------- Previous update was at 12:27 PM ----------

Check this perl code. Works on...
3,237
Posted By chakrapani
Any of these work ? The UNIX School: gawk -...
Any of these work ?

The UNIX School: gawk - Date and time calculation functions (http://www.theunixschool.com/2013/01/gawk-date-and-time-calculation-functions.html)

Can we use Perl instead ?
...
Showing results 1 to 25 of 210

 

Featured Tech Videos

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