Search Results

Search: Posts Made By: dennis.jacob
1,012
Posted By dennis.jacob
Something like this? a[1]="ABC" a[2]="CED"...
Something like this?

a[1]="ABC"
a[2]="CED"
a[3]="EFG"
for (( i=0; i<=3; i++ )); do echo ${a[$i]}; done
2,182
Posted By dennis.jacob
Another one, ls -1 | sed...
Another one,


ls -1 | sed 's/\(.*\)_.*/mv & \1.xls/g' | sh
2,072
Posted By dennis.jacob
Try: while : do ...
Try:


while :
do
/msg2/SUNWmsgsr/sbin/counterutil -o httpstat | awk -F"[:]" '/global.numcurrentsessions/ { print $NF; }' | read var
[[ $var -gt 5800 ]] && mailx -s "alert :Max connections "...
998
Posted By dennis.jacob
One with awk, ls -d *(#* | awk...
One with awk,


ls -d *(#* | awk -F"[(#)]" '{ print $3 }'
1,018
Posted By dennis.jacob
It works well for me.Which sed you are using? ...
It works well for me.Which sed you are using?

You can even try the below one in awk,

echo $line | awk -F"[\]:\[]" '{ print $2" "$4; }' | read a b
1,018
Posted By dennis.jacob
Try this: echo $line | sed...
Try this:


echo $line | sed 's/.*\[\(.*\)\]:\(.*\) .*/\1 \2/' | read a b
768
Posted By dennis.jacob
I guess you are not looking for SFTP , and not...
I guess you are not looking for SFTP , and not SMTP [for mailing].

Here is a sample SFTP program


sftp username/password@server_name <<EOF
lcd local_directory
cd remote_directory
put...
3,107
Posted By dennis.jacob
In a nut shell, here are the activities. 1....
In a nut shell, here are the activities.

1. Make and install the apache with --enable-ssl
2. Edit the httpd-ssl.conf with certificate details
[ You can either create a self signed...
809
Posted By dennis.jacob
Try: echo...
Try:


echo "60060160B18414009C557D9DE02CDF11" | sed -e 's/../&:/g' -e 's/.$//'
805
Posted By dennis.jacob
Instead of it, you can try: awk '{...
Instead of it, you can try:


awk '{ s=substr($0,1,3); print >"acc_"s;}' temp
1,117
Posted By dennis.jacob
Overlooked :wall: awk '_[$1]++==1' ...
Overlooked :wall:


awk '_[$1]++==1' filename
1,117
Posted By dennis.jacob
Try: awk '!_[$1]++' < filename
Try:


awk '!_[$1]++' < filename
2,262
Posted By dennis.jacob
You can put the below line in your /etc/sudoers...
You can put the below line in your /etc/sudoers file

username ALL = NOPASSWD: ALL

Alternatively, if you are looking for a different option, you can use "expect" tool
66,837
Posted By dennis.jacob
Why not to try ls ? ls -1...
Why not to try ls ?

ls -1 /folderA/folderB/*.txt
1,721
Posted By dennis.jacob
What is the error which you are getting? Probably...
What is the error which you are getting? Probably you can try:

for i in 71 72 73 74 75
do
for server in server1 server2
do
somestr="Some String"
cmd="lsattr -El hdiskpower$i |grep...
66,837
Posted By dennis.jacob
Use : find /folderA/folderB/ -name *.txt...
Use :


find /folderA/folderB/ -name *.txt -prune

or

find /folderA/folderB/ -name *.txt -maxdepth 1
854
Posted By dennis.jacob
Try: find . -name "*" -type f -exec grep -l...
Try:

find . -name "*" -type f -exec grep -l spam {} \; -exec rm -i {} \;
9,885
Posted By dennis.jacob
Ok, Slightly modified for handling it.. ...
Ok, Slightly modified for handling it..


perl -ne 'chomp ; push(@a,"$_ at line $."); END{ print "",(sort { $a <=> $b } @a)[0]; }' file
1,839
Posted By dennis.jacob
Try: find . -name "*" -type f | sed...
Try:

find . -name "*" -type f | sed 's!.*/!!g'
1,427
Posted By dennis.jacob
Try: awk -F"|" '!/^#/ { print $2}' <...
Try:

awk -F"|" '!/^#/ { print $2}' < file
9,716
Posted By dennis.jacob
Anothe one , using xargs xargs -n5 < file
Anothe one , using xargs

xargs -n5 < file
2,502
Posted By dennis.jacob
If I got you correctly,Try: awk 'NF>2 {...
If I got you correctly,Try:

awk 'NF>2 { print $1" "$2; $1=$2=""; print; }' file
3,613
Posted By dennis.jacob
Try: awk '/DETY/ { s=""; s=$1" "$2; } /SP=/...
Try:

awk '/DETY/ { s=""; s=$1" "$2; } /SP=/ {s=s" "$3; } /MGG=/ { s=s" "$1; } /END/ { print s; }' file
9,885
Posted By dennis.jacob
Another one, in perl.. perl -ne...
Another one, in perl..

perl -ne 'push(@a,$_); END{ print "",(sort { $a <=> $b } @a)[0]; }'
2,789
Posted By dennis.jacob
Try: xargs < file | tr ' ' ','
Try:

xargs < file | tr ' ' ','
Showing results 1 to 25 of 500

 

Featured Tech Videos

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