Search Results

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


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


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


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


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


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


awk '!_[$1]++' < filename
3,997
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
105,084
Posted By dennis.jacob
Why not to try ls ? ls -1...
Why not to try ls ?

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

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

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

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

xargs -n5 < file
7,185
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,825
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
19,606
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]; }'
4,536
Posted By dennis.jacob
Try: xargs < file | tr ' ' ','
Try:

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

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