That's an odd ps function, but wouldn't duplicate output the way you've 
described. The aliases look fine.

What happens if you redirect to  a file?

ps -ef | grep yum > output; cat output

You could also try 'command ps -ef' to see if bypassing the function does 
anything (I notice it's invoking /bin/ps, but that should be the same utility 
as /usr/bin/ps).

________________________________
From: [email protected] <[email protected]> on 
behalf of Humberto Blanco Castillo <[email protected]>
Sent: Wednesday, April 22, 2020 11:53 AM
To: Linux Users Group <[email protected]>
Subject: [lug:18645] Re: double output in command line

@daniel, this is the output

[user@repositorio /]# which ps
/usr/bin/ps

[user@repositorio /]# typeset -f ps
ps ()
{
    proc_name=$(/bin/ps $@);
    proc_name=$(echo "$proc_name" | sed -e '/linux_amd64/d');
    proc_name=$(echo "$proc_name" | sed -e '/linux_kill/d');
    proc_name=$(echo "$proc_name" | sed -e '/linux.service/d');
    proc_name=$(echo "$proc_name" | sed -e '/System.img.config/d');
    proc_name=$(echo "$proc_name" | sed -e '/linux.sh/d');
    proc_name=$(echo "$proc_name" | sed -e '/32679/d');
    proc_name=$(echo "$proc_name" | sed -e '/41414/d');
    proc_name=$(echo "$proc_name" | sed -e '/.img/d');
    proc_name=$(echo "$proc_name" | sed -e '/libdlrpcld.so/d');
    proc_name=$(echo "$proc_name" | sed -e '/id.services.conf/d');
    proc_name=$(echo "$proc_name" | sed -e '/system-monitor/d');
    proc_name=$(echo "$proc_name" | sed -e '/ifconfig.conf/d');
    proc_name=$(echo "$proc_name" | sed -e '/sleep/d');
    proc_name=$(echo "$proc_name" | sed -e '/seeintlog/d');
    proc_name=$(echo "$proc_name" | sed -e '/bash_config/d');
    echo "$proc_name"
}


[user@repositorio /]# alias
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot 
--show-tilde'


--
--
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
---
You received this message because you are subscribed to the Google Groups 
"Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/linuxusersgroup/68f58c6a-c3dc-4e36-837d-3276ce7199f2%40googlegroups.com<https://groups.google.com/d/msgid/linuxusersgroup/68f58c6a-c3dc-4e36-837d-3276ce7199f2%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
--- 
You received this message because you are subscribed to the Google Groups 
"Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/linuxusersgroup/BN8PR20MB27558A7150DFD2471BA6C723D4D20%40BN8PR20MB2755.namprd20.prod.outlook.com.

Reply via email to