Re: [id-slackware] Intisari untuk id-slackware@googlegroups.com - 2 pembaruan pada 1 topik

12 views
Skip to first unread message

rian baho

unread,
Jun 3, 2017, 2:37:14 PM6/3/17
to id-sla...@googlegroups.com
jadi begini pak, saya membuat .bashrc dan bash_profile mengikuti petunjuk dari http://tldp.org/LDP/abs/html/sample-bashrc.html

nah setelah itu muncul pesan :
/usr/bin/texi2dvi: Missing file arguments
......
dan saya coba cek, mengikuti petunjuk di mbah google
$ texi2dvi --version
texi2dvi (GNU Texinfo 6.1) 6991
.....
kira2 apa ya pak penyebabnya pak
makasih,

Pada 3 Juni 2017 22.22, <id-sla...@googlegroups.com> menulis:
rian baho <rian...@gmail.com>: Jun 03 05:46AM -0700

selamat malam para master
ada yang mau saya tanyakan
di terminal ada pesan
 
/usr/bin/texi2dvi: Missing file arguments
/usr/bin/texi2dvi: Try `--help' for more information.
bash: have: command not found
 
apakah maksud pesan ini ya, mungkin ada yang bisa membantu saya newbie
makasih
Willy Sudiarto Raharjo <wil...@gmail.com>: Jun 03 08:05PM +0700


> /usr/bin/texi2dvi: Missing file arguments
> /usr/bin/texi2dvi: Try `--help' for more information.
> bash: have: command not found
 
habis melakukan perubahan apa?
 
 
Willy Sudiarto Raharjo
Personal Blog : http://willysr.blogspot.com
Linux Blog: http://slackblogs.blogspot.com
Anda menerima intisari ini karena telah berlangganan pembaruan untuk grup ini. Anda dapat mengubah setelan ini pada laman keanggotaan grup.
Untuk berhenti berlangganan dari grup ini dan berhenti menerima email dari grup in, kirim email ke id-slackware+unsubscribe@googlegroups.com .

Willy Sudiarto Raharjo

unread,
Jun 3, 2017, 2:56:55 PM6/3/17
to id-sla...@googlegroups.com
> jadi begini pak, saya membuat .bashrc dan bash_profile mengikuti petunjuk dari http://tldp.org/LDP/abs/html/sample-bashrc.html
>
> nah setelah itu muncul pesan :
> /usr/bin/texi2dvi: Missing file arguments
> ......
> dan saya coba cek, mengikuti petunjuk di mbah google
> $ texi2dvi --version
> texi2dvi (GNU Texinfo 6.1) 6991
> .....
> kira2 apa ya pak penyebabnya pak
> makasih,

Bisa tolong disebutkan isi file .bashrc dan .bash_profile Anda?
tanpa lihat isinya bagaimana kami bisa membantu ?


--

localdisaster disaster

unread,
Jun 3, 2017, 4:09:12 PM6/3/17
to id-sla...@googlegroups.com

Coba lihat .Rprofilenya gan


--
--
=============================ID-SLACKWARE=============================
Alamat pengiriman pesan : id-sla...@googlegroups.com
Untuk Keluar: kirimkan email ke id-slackware+unsubscribe@googlegroups.com
FAQ: http://goo.gl/7PXCZ
=============================ID-SLACKWARE=============================
---
Anda menerima pesan ini karena Anda berlangganan grup "id-slackware" dari Google Grup.
Untuk berhenti berlangganan dan berhenti menerima email dari grup ini, kirim email ke id-slackware+unsubscribe@googlegroups.com.
Untuk opsi lainnya, kunjungi https://groups.google.com/d/optout.

rian baho

unread,
Jun 12, 2017, 5:39:40 AM6/12/17
to id-sla...@googlegroups.com
iya om, akhirnya dengan terpaksa saya instal ulang, dan membuat kembali .bashrc dan bash_profilenya,
thanks om willy


2017-06-05 22:21 GMT+07:00 <id-sla...@googlegroups.com>:
rian baho <rian...@gmail.com>: Jun 05 04:59PM +0700

ini pak saya copas bashrc dan bash-profilenya, maklum pak newbie
.bashrc
 
# =============================================================== #
#
# PERSONAL $HOME/.bashrc FILE for bash-3.0 (or later)
# By Emmanuel Rouat [no-email]
#
# Last modified: Tue Nov 20 22:04:47 CET 2012
 
# This file is normally read by interactive shells only.
#+ Here is the place to define your aliases, functions and
#+ other interactive features like your prompt.
#
# The majority of the code here assumes you are on a GNU
#+ system (most likely a Linux box) and is often based on code
#+ found on Usenet or Internet.
#
# See for instance:
# http://tldp.org/LDP/abs/html/index.html
# http://www.caliban.org/bash
# http://www.shelldorado.com/scripts/categories.html
# http://www.dotfiles.org
#
# The choice of colors was done for a shell with a dark background
#+ (white on black), and this is usually also suited for pure text-mode
#+ consoles (no X server available). If you use a white background,
#+ you'll have to do some other choices for readability.
#
# This bashrc file is a bit overcrowded.
# Remember, it is just just an example.
# Tailor it to your needs.
#
# =============================================================== #
 
# --> Comments added by HOWTO author.
 
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
 
 
#-------------------------------------------------------------
# Source global definitions (if any)
#-------------------------------------------------------------
 
 
if [ -f /etc/bashrc ]; then
. /etc/bashrc # --> Read /etc/bashrc, if present.
fi
 
 
#--------------------------------------------------------------
# Automatic setting of $DISPLAY (if not set already).
# This works for me - your mileage may vary. . . .
# The problem is that different types of terminals give
#+ different answers to 'who am i' (rxvt in particular can be
#+ troublesome) - however this code seems to work in a majority
#+ of cases.
#--------------------------------------------------------------
 
function get_xserver ()
{
case $TERM in
xterm )
XSERVER=$(who am i | awk '{print $NF}' | tr -d ')''(' )
# Ane-Pieter Wieringa suggests the following alternative:
# I_AM=$(who am i)
# SERVER=${I_AM#*(}
# SERVER=${SERVER%*)}
XSERVER=${XSERVER%%:*}
;;
aterm | rxvt)
# Find some code that works here. ...
;;
esac
}
 
if [ -z ${DISPLAY:=""} ]; then
get_xserver
if [[ -z ${XSERVER} || ${XSERVER} == $(hostname) ||
${XSERVER} == "unix" ]]; then
DISPLAY=":0.0" # Display on local host.
else
DISPLAY=${XSERVER}:0.0 # Display on remote host.
fi
fi
 
export DISPLAY
 
#-------------------------------------------------------------
# Some settings
#-------------------------------------------------------------
 
#set -o nounset # These two options are useful for debugging.
#set -o xtrace
alias debug="set -o nounset; set -o xtrace"
 
ulimit -S -c 0 # Don't want coredumps.
set -o notify
set -o noclobber
set -o ignoreeof
 
 
# Enable options:
shopt -s cdspell
shopt -s cdable_vars
shopt -s checkhash
shopt -s checkwinsize
shopt -s sourcepath
shopt -s no_empty_cmd_completion
shopt -s cmdhist
shopt -s histappend histreedit histverify
shopt -s extglob # Necessary for programmable completion.
 
# Disable options:
shopt -u mailwarn
unset MAILCHECK # Don't want my shell to warn me of incoming mail.
 
 
#-------------------------------------------------------------
# Greeting, motd etc. ...
#-------------------------------------------------------------
 
# Color definitions (taken from Color Bash Prompt HowTo).
# Some colors might look different of some terminals.
# For example, I see 'Bold Red' as 'orange' on my screen,
# hence the 'Green' 'BRed' 'Red' sequence I often use in my prompt.
 
 
# Normal Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
 
# Bold
BBlack='\e[1;30m' # Black
BRed='\e[1;31m' # Red
BGreen='\e[1;32m' # Green
BYellow='\e[1;33m' # Yellow
BBlue='\e[1;34m' # Blue
BPurple='\e[1;35m' # Purple
BCyan='\e[1;36m' # Cyan
BWhite='\e[1;37m' # White
 
# Background
On_Black='\e[40m' # Black
On_Red='\e[41m' # Red
On_Green='\e[42m' # Green
On_Yellow='\e[43m' # Yellow
On_Blue='\e[44m' # Blue
On_Purple='\e[45m' # Purple
On_Cyan='\e[46m' # Cyan
On_White='\e[47m' # White
 
NC="\e[m" # Color Reset
 
 
ALERT=${BWhite}${On_Red} # Bold White on red background
 
 
 
echo -e "${BCyan}This is BASH ${BRed}${BASH_VERSION%.*}${BCyan}\
- DISPLAY on ${BRed}$DISPLAY${NC}\n"
date
if [ -x /usr/games/fortune ]; then
/usr/games/fortune -s # Makes our day a bit more fun.... :-)
fi
 
function _exit() # Function to run upon exit of shell.
{
echo -e "${BRed}Hasta la vista, baby${NC}"
}
trap _exit EXIT
 
#-------------------------------------------------------------
# Shell Prompt - for many examples, see:
# http://www.debian-administration.org/articles/205
# http://www.askapache.com/linux/bash-power-prompt.html
# http://tldp.org/HOWTO/Bash-Prompt-HOWTO
# https://github.com/nojhan/liquidprompt
#-------------------------------------------------------------
# Current Format: [TIME USER@HOST PWD] >
# TIME:
# Green == machine load is low
# Orange == machine load is medium
# Red == machine load is high
# ALERT == machine load is very high
# USER:
# Cyan == normal user
# Orange == SU to user
# Red == root
# HOST:
# Cyan == local session
# Green == secured remote connection (via ssh)
# Red == unsecured remote connection
# PWD:
# Green == more than 10% free disk space
# Orange == less than 10% free disk space
# ALERT == less than 5% free disk space
# Red == current user does not have write privileges
# Cyan == current filesystem is size zero (like /proc)
# >:
# White == no background or suspended jobs in this shell
# Cyan == at least one background job in this shell
# Orange == at least one suspended job in this shell
#
# Command is added to the history file each time you hit enter,
# so it's available to all shells (using 'history -a').
 
 
# Test connection type:
if [ -n "${SSH_CONNECTION}" ]; then
CNX=${Green} # Connected on remote machine, via ssh (good).
elif [[ "${DISPLAY%%:0*}" != "" ]]; then
CNX=${ALERT} # Connected on remote machine, not via ssh (bad).
else
CNX=${BCyan} # Connected on local machine.
fi
 
# Test user type:
if [[ ${USER} == "root" ]]; then
SU=${Red} # User is root.
elif [[ ${USER} != $(logname) ]]; then
SU=${BRed} # User is not login user.
else
SU=${BCyan} # User is normal (well ... most of us are).
fi
 
 
 
NCPU=$(grep -c 'processor' /proc/cpuinfo) # Number of CPUs
SLOAD=$(( 100*${NCPU} )) # Small load
MLOAD=$(( 200*${NCPU} )) # Medium load
XLOAD=$(( 400*${NCPU} )) # Xlarge load
 
# Returns system load as percentage, i.e., '40' rather than '0.40)'.
function load()
{
local SYSLOAD=$(cut -d " " -f1 /proc/loadavg | tr -d '.')
# System load of the current host.
echo $((10#$SYSLOAD)) # Convert to decimal.
}
 
# Returns a color indicating system load.
function load_color()
{
local SYSLOAD=$(load)
if [ ${SYSLOAD} -gt ${XLOAD} ]; then
echo -en ${ALERT}
elif [ ${SYSLOAD} -gt ${MLOAD} ]; then
echo -en ${Red}
elif [ ${SYSLOAD} -gt ${SLOAD} ]; then
echo -en ${BRed}
else
echo -en ${Green}
fi
}
 
# Returns a color according to free disk space in $PWD.
function disk_color()
{
if [ ! -w "${PWD}" ] ; then
echo -en ${Red}
# No 'write' privilege in the current directory.
elif [ -s "${PWD}" ] ; then
local used=$(command df -P "$PWD" |
awk 'END {print $5} {sub(/%/,"")}')
if [ ${used} -gt 95 ]; then
echo -en ${ALERT} # Disk almost full (>95%).
elif [ ${used} -gt 90 ]; then
echo -en ${BRed} # Free disk space almost gone.
else
echo -en ${Green} # Free disk space is ok.
fi
else
echo -en ${Cyan}
# Current directory is size '0' (like /proc, /sys etc).
fi
}
 
# Returns a color according to running/suspended jobs.
function job_color()
{
if [ $(jobs -s | wc -l) -gt "0" ]; then
echo -en ${BRed}
elif [ $(jobs -r | wc -l) -gt "0" ] ; then
echo -en ${BCyan}
fi
}
 
# Adds some text in the terminal frame (if applicable).
 
 
# Now we construct the prompt.
PROMPT_COMMAND="history -a"
case ${TERM} in
*term | rxvt | linux)
PS1="\[\$(load_color)\][\A\[${NC}\] "
# Time of day (with load info):
PS1="\[\$(load_color)\][\A\[${NC}\] "
# User@Host (with connection type info):
PS1=${PS1}"\[${SU}\]\u\[${NC}\]@\[${CNX}\]\h\[${NC}\] "
# PWD (with 'disk space' info):
PS1=${PS1}"\[\$(disk_color)\]\W]\[${NC}\] "
# Prompt (with 'job' info):
PS1=${PS1}"\[\$(job_color)\]>\[${NC}\] "
# Set title of current xterm:
PS1=${PS1}"\[\e]0;[\u@\h] \w\a\]"
;;
*)
PS1="(\A \u@\h \W) > " # --> PS1="(\A \u@\h \w) > "
# --> Shows full pathname of current dir.
;;
esac
 
 
 
export TIMEFORMAT=$'\nreal %3R\tuser %3U\tsys %3S\tpcpu %P\n'
export HISTIGNORE="&:bg:fg:ll:h"
export HISTTIMEFORMAT="$(echo -e ${BCyan})[%d/%m %H:%M:%S]$(echo -e ${NC}) "
export HISTCONTROL=ignoredups
export HOSTFILE=$HOME/.hosts # Put a list of remote hosts in ~/.hosts
 
 
#============================================================
#
# ALIASES AND FUNCTIONS
#
# Arguably, some functions defined here are quite big.
# If you want to make this file smaller, these functions can
#+ be converted into scripts and removed from here.
#
#============================================================
 
#-------------------
# Personnal Aliases
#-------------------
 
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# -> Prevents accidentally clobbering files.
alias mkdir='mkdir -p'
 
alias h='history'
alias j='jobs -l'
alias which='type -a'
alias ..='cd ..'
 
# Pretty-print of some PATH variables:
alias path='echo -e ${PATH//:/\\n}'
alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}'
 
 
alias du='du -kh' # Makes a more readable output.
alias df='df -kTh'
 
#-------------------------------------------------------------
# The 'ls' family (this assumes you use a recent GNU ls).
#-------------------------------------------------------------
# Add colors for filetype and human-readable sizes by default on 'ls':
alias ls='ls -h --color'
alias lx='ls -lXB' # Sort by extension.
alias lk='ls -lSr' # Sort by size, biggest last.
alias lt='ls -ltr' # Sort by date, most recent last.
alias lc='ls -ltcr' # Sort by/show change time,most recent last.
alias lu='ls -ltur' # Sort by/show access time,most recent last.
 
# The ubiquitous 'll': directories first, with alphanumeric sorting:
alias ll="ls -lv --group-directories-first"
alias lm='ll |more' # Pipe through 'more'
alias lr='ll -R' # Recursive ls.
alias la='ll -A' # Show hidden files.
alias tree='tree -Csuh' # Nice alternative to 'recursive ls' ...
 
 
#-------------------------------------------------------------
# Tailoring 'less'
#-------------------------------------------------------------
 
alias more='less'
export PAGER=less
export LESSCHARSET='latin1'
export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-'
# Use this if lesspipe.sh exists.
export LESS='-i -N -w -z-4 -g -e -M -X -F -R -P%t?f%f \
:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
 
# LESS man page colors (makes Man pages more readable).
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
 
 
#-------------------------------------------------------------
# Spelling typos - highly personnal and keyboard-dependent :-)
#-------------------------------------------------------------
 
alias xs='cd'
alias vf='cd'
alias moer='more'
alias moew='more'
alias kk='ll'
 
 
#-------------------------------------------------------------
# A few fun ones
#-------------------------------------------------------------
 
# Adds some text in the terminal frame (if applicable).
 
function xtitle()
{
case "$TERM" in
*term* | rxvt)
echo -en "\e]0;$*\a" ;;
*) ;;
esac
}
 
 
# Aliases that use xtitle
alias top='xtitle Processes on $HOST && top'
alias make='xtitle Making $(basename $PWD) ; make'
 
# .. and functions
function man()
{
for i ; do
xtitle The $(basename $1|tr -d .[:digit:]) manual
command man -a "$i"
done
}
 
 
#-------------------------------------------------------------
# Make the following commands run in background automatically:
#-------------------------------------------------------------
 
function te() # wrapper around xemacs/gnuserv
{
if [ "$(gnuclient -batch -eval t 2>&-)" == "t" ]; then
gnuclient -q "$@";
else
( xemacs "$@" &);
fi
}
 
function soffice() { command soffice "$@" & }
function firefox() { command firefox "$@" & }
function xpdf() { command xpdf "$@" & }
 
 
#-------------------------------------------------------------
# File & strings related functions:
#-------------------------------------------------------------
 
 
# Find a file with a pattern in name:
function ff() { find . -type f -iname '*'"$*"'*' -ls ; }
 
# Find a file with pattern $1 in name and Execute $2 on it:
function fe() { find . -type f -iname '*'"${1:-}"'*' \
-exec ${2:-file} {} \; ; }
 
# Find a pattern in a set of files and highlight them:
#+ (needs a recent version of egrep).
function fstr()
{
OPTIND=1
local mycase=""
local usage="fstr: find string in files.
Usage: fstr [-i] \"pattern\" [\"filename pattern\"] "
while getopts :it opt
do
case "$opt" in
i) mycase="-i " ;;
*) echo "$usage"; return ;;
esac
done
shift $(( $OPTIND - 1 ))
if [ "$#" -lt 1 ]; then
echo "$usage"
return;
fi
find . -type f -name "${2:-*}" -print0 | \
xargs -0 egrep --color=always -sn ${case} "$1" 2>&- | more
 
}
 
 
function swap()
{ # Swap 2 filenames around, if they exist (from Uzi's bashrc).
local TMPFILE=tmp.$$
 
[ $# -ne 2 ] && echo "swap: 2 arguments needed" && return 1
[ ! -e $1 ] && echo "swap: $1 does not exist" && return 1
[ ! -e $2 ] && echo "swap: $2 does not exist" && return 1
 
mv "$1" $TMPFILE
mv "$2" "$1"
mv $TMPFILE "$2"
}
 
function extract() # Handy Extract Program
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
Willy Sudiarto Raharjo <wil...@gmail.com>: Jun 05 06:39PM +0700

Ditempat saya baik-baik saja untuk .bashrc
 
. bash-test
This is BASH 4.4- DISPLAY on :0
 
Mon Jun 5 18:38:08 WIB 2017
Nasrudin walked into a teahouse and declaimed, "The moon is more useful
than the sun." "Why?", he was asked. "Because at night we need the
light more."
 
. bash2-test
 
[~]
(18:39:29)-(willysr)-(505)->

 
 
--
Willy Sudiarto Raharjo
Personal Blog : http://willysr.blogspot.com
Linux Blog: http://slackblogs.blogspot.com
Reply all
Reply to author
Forward
0 new messages