Search Results

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


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


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


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


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


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


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

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

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

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

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

xargs -n5 < file
5,870
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,365
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
18,721
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,980
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 12:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy