Login or Register to Ask a Question and Join Our Community

Search Results

Search: Posts Made By: dennis.jacob
1,161
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,579
Posted By dennis.jacob
Another one, ls -1 | sed...
Another one,


ls -1 | sed 's/\(.*\)_.*/mv & \1.xls/g' | sh
2,385
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 "...
1,353
Posted By dennis.jacob
One with awk, ls -d *(#* | awk...
One with awk,


ls -d *(#* | awk -F"[(#)]" '{ print $3 }'
1,304
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,304
Posted By dennis.jacob
Try this: echo $line | sed...
Try this:


echo $line | sed 's/.*\[\(.*\)\]:\(.*\) .*/\1 \2/' | read a b
1,072
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,400
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...
959
Posted By dennis.jacob
Try: echo...
Try:


echo "60060160B18414009C557D9DE02CDF11" | sed -e 's/../&:/g' -e 's/.$//'
1,066
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,350
Posted By dennis.jacob
Overlooked :wall: awk '_[$1]++==1' ...
Overlooked :wall:


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


awk '!_[$1]++' < filename
2,942
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
85,641
Posted By dennis.jacob
Why not to try ls ? ls -1...
Why not to try ls ?

ls -1 /folderA/folderB/*.txt
2,152
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...
85,641
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
1,073
Posted By dennis.jacob
Try: find . -name "*" -type f -exec grep -l...
Try:

find . -name "*" -type f -exec grep -l spam {} \; -exec rm -i {} \;
15,586
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
2,167
Posted By dennis.jacob
Try: find . -name "*" -type f | sed...
Try:

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

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

xargs -n5 < file
3,586
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
4,021
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
15,586
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]; }'
3,192
Posted By dennis.jacob
Try: xargs < file | tr ' ' ','
Try:

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

 

Featured Tech Videos