Search Results

Search: Posts Made By: rbalaj16
2,239
Posted By RudiC
How far would this get you: awk ' {FN =...
How far would this get you: awk '
{FN = FILENAME ".TMP"
if (FN != FNO) close (FNO)
FNO = FN
sub ("/proj/[^/]*/sun", "/proj/app-i1/sun")
sub...
1,328
Posted By MadeInGermany
With GNU/Posix awk, linefeed after each ">" ...
With GNU/Posix awk,
linefeed after each ">"
awk 'BEGIN {FS=">"; OFS=FS RS} NF>1 {$1=$1} 1' fileAdding an extra ">"
awk 'BEGIN {FS=">"; OFS=FS RS} NF>1 {$NF=$NF FS} 1' file
1,328
Posted By Yoda
awk -F'>' '{$0=$0">"}{$1=$1; OFS=FS RS}1'...
awk -F'>' '{$0=$0">"}{$1=$1; OFS=FS RS}1' file
Forum: Solaris 02-12-2013
17,825
Posted By Yoda
How about: lsof -i [:port] $ lsof -i :8080 ...
How about: lsof -i [:port]
$ lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 19483 username 27u IPv4 0x3021febbcc0 0t0 TCP *:8080 (LISTEN)
...
Forum: Solaris 02-12-2013
17,825
Posted By jlliagre
This is the shell function I'm using: function...
This is the shell function I'm using:
function sockpid
{
pfiles /proc/* | nawk '
/^[0-9]*:/ { process=$0 }
/^ [0-9]*:/ { descriptor=$1 }
/port: '$1'/ { printf("pid: %-40s fd: %s...
Forum: Solaris 02-12-2013
17,825
Posted By jim mcnamara
Yes. sockets are represented as file descriptors.
Yes. sockets are represented as file descriptors.
Forum: Solaris 02-12-2013
17,825
Posted By DGPickett
Can you find sockets in /proc/?
Can you find sockets in /proc/?
Forum: Solaris 02-12-2013
17,825
Posted By jim mcnamara
lsof is not normally on Solaris. You can install...
lsof is not normally on Solaris. You can install the package for it.
Where srchp is the port number... you have to be root to do this, and it is not very efficient.


srchp=14002
ptree -a |...
Forum: Solaris 02-12-2013
17,825
Posted By DGPickett
The tool you want is lsof (list open file), which...
The tool you want is lsof (list open file), which will see processes on sockets, tell you the remote end, etc.
37,559
Posted By Corona688
Oh. If you want to grep for an exact string,...
Oh. If you want to grep for an exact string, then:

grep -F '!@#$%' filename
5,719
Posted By rangarasan
use nawk instead of awk if you are using solaris.
use nawk instead of awk if you are using solaris.
5,719
Posted By itkamaraj
try this awk -F"[][]"...
try this


awk -F"[][]" '{if($0~/Processing/){a=$2}else{print a":"$0}}' input.txt
1,565
Posted By Scrutinizer
Try: paste -d '\n' file1.txt file2.txt
Try:
paste -d '\n' file1.txt file2.txt
3,584
Posted By Corona688
xargs -n 1 echo < filename
xargs -n 1 echo < filename
3,584
Posted By radoulov
Yes. I should have mentioned it, thanks!
Yes. I should have mentioned it, thanks!
3,584
Posted By Scrutinizer
Keep 'm coming :) awk '{$1=$1}1' OFS="\n"...
Keep 'm coming :)
awk '{$1=$1}1' OFS="\n" infile
grep -Eo '[^ \t]+' infile
sed 's/[ \t][ \t]*/\
/g' infile
3,584
Posted By methyl
Though I'd use the "tr" in post #2, yet another...
Though I'd use the "tr" in post #2, yet another one ...

awk 'BEGIN {RS=" ";ORS="\n"} {print $0}' infile
3,584
Posted By Scrutinizer
And another one... xargs -n1 < infile ...
And another one...
xargs -n1 < infile
@radoulov, that would allow the shell to do unintended filename expansion, no?
3,584
Posted By radoulov
And another one: printf '%s\n' $(< infile)
And another one:

printf '%s\n' $(< infile)
3,584
Posted By bartus11
tr " " "\n" < file
tr " " "\n" < file
5,760
Posted By frappa
Hi, regarding getting rid of the password...
Hi,

regarding getting rid of the password request at login time, try to explicitly specify the full path to the id_rsa (the local *private* key) on your local host with the -i switch of ssh...
917
Posted By radoulov
while read machine; do ssh "$USER@$machine" <...
while read machine; do
ssh "$USER@$machine" < "$STEPS" > "$machine_$PRI.log" &
done < "$MACHINE"
2,197
Posted By felipe.vinturin
Here it works! # line="PRI#echo $PWD" #...
Here it works!

# line="PRI#echo $PWD"
# command=`echo "${line}" | cut -d '#' -f2,3,4`
# $command
/current/path


You can try to use: eval, but be careful, eval is evil!

# line="PRI#echo...
1,093
Posted By Franklin52
One way: awk -F"#" '/^PRE/{print $2}' file |...
One way:
awk -F"#" '/^PRE/{print $2}' file | sh
Showing results 1 to 24 of 24

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