Search Results

Search: Posts Made By: MadeInGermany
Forum: Solaris 1 Day Ago
1,048
Posted By MadeInGermany
You do not need auditing. All system access...
You do not need auditing.
All system access should go through PAM. The standard PAM logging is already a (wrong) comment in /etc/syslog.conf:
Activated it looks like this:
auth.info ...
166
Posted By MadeInGermany
Try the following #!/bin/sh ...
Try the following
#!/bin/sh
TimeStamp=$(/bin/date "+%Y-%m-%d")
servernums="$(seq 10 16) 19"

# print args on one line separated by ","
myprint(){
[ $# -ge 1 ] || return
printf "%s" "$1"
...
336
Posted By MadeInGermany
Perhaps tab characters were converted to spaces?...
Perhaps tab characters were converted to spaces? Often copy/paste of text does it.

The awk sample in the previous post works with tabs or spaces.
278
Posted By MadeInGermany
Here is one for all ksh versions: #### here...
Here is one for all ksh versions:
#### here filename contain XXXX_YYYY_ZZZZ_DDD.txt as example
while read filename
do

### split filename on "."
extension="${filename##*.}"
[ "$extension" =...
278
Posted By MadeInGermany
${IARR[-1]} is bash-4. ksh (and bash-3) need...
${IARR[-1]} is bash-4.
ksh (and bash-3) need ${IARR[${#IARR[@]}-1]}

read -A and <<< require ksh93 - do not work with the older ksh88.
Forum: AIX 4 Days Ago
204
Posted By MadeInGermany
Yes, rpcbind/portmap is needed, and rpcinfo -p...
Yes, rpcbind/portmap is needed, and rpcinfo -p must show mountd and nfs and their udp/tcp ports.
Please check the following:
AIX for System Administrators...
Forum: AIX 1 Week Ago
359
Posted By MadeInGermany
Try without -t (that wants to open a terminal on...
Try without -t (that wants to open a terminal on the remote)
ssh server command
531
Posted By MadeInGermany
Tip: ptree for linux
Please safe the following script as "/usr/local/bin/ptree", and make it executable.
#!/bin/sh
# Solaris style ptree

[ -x /usr/bin/ptree ] && exec /usr/bin/ptree "$@"
...
175
Posted By MadeInGermany
Yes, it works. The argument...
Yes, it works. The argument /Aug/Work/Universal_File.txt lands in $1.
The prefixed sh allows the /Aug/Work/main.sh to not be executable.
402
Posted By MadeInGermany
The ls in your script omits the full path. The...
The ls in your script omits the full path.
The following does not:
for file in $FILE_PATH/*
do
$OPT_PATH/load_script "$file" &
done
258
Posted By MadeInGermany
If you want to print files side by side, you have...
If you want to print files side by side, you have to print them at the same time.
Like you python script in your post#1 does.

In the shell the "read" command automatically chops the leading end...
1,626
Posted By MadeInGermany
Two substitutions is best here. You can do it...
Two substitutions is best here.
You can do it with one substitution though, as you intended.
sed 's/.*"title": "\([^"]*\)",.*/\1/'
Leading and trailing. * cover all the line, so all is...
258
Posted By MadeInGermany
It's really not clear. If you want to view the...
It's really not clear.
If you want to view the two files side by side, then I recommend MidnightCommander (mc).
To print the files side by side, you can try
paste file1 file2
606
Posted By MadeInGermany
The if (t ~ $1) is a RE match that is "fuzzy"...
The if (t ~ $1) is a RE match that is "fuzzy" unless it is anchored.
Should be if (t ~ ("^" $1)); the ^ anchor means the string $1 must occur at the beginning of string t.
Forum: Solaris 1 Week Ago
559
Posted By MadeInGermany
Thanks for the update. If a NIC suddenly fails,...
Thanks for the update.
If a NIC suddenly fails, and no admin did something to your system or to the LAN switch then the next idea is hardware.

The IPMP concept is quite different from the port...
606
Posted By MadeInGermany
A shell script that works as I described: ...
A shell script that works as I described:
#!/bin/sh
# read from f1, print in this order
while read f1line
do
# read from f2, find matches => print
while IFS="," read f2col1 f2othercols
...
346
Posted By MadeInGermany
Try something with getent passwd That works...
Try something with
getent passwd
That works on many OS.
462
Posted By MadeInGermany
You mean the base64-string is repeated on the...
You mean the base64-string is repeated on the next line?
Doesn't make sense, does it? Currently it is ignored. Nothing to be done.
378
Posted By MadeInGermany
It is also doable with ls -l | while read a b c...
It is also doable with
ls -l | while read a b c d e f g h fn; do if [ "$f" = "Aug" ] && [ "$g" = "1" ]; then echo rm "$fn"; fi; doneIf you are happy then remove the echo before the rm.
Caution:...
462
Posted By MadeInGermany
With bash builtins: #!/bin/bash while read w1...
With bash builtins:
#!/bin/bash
while read w1 line
do
case $w1 in
(uid:) uid=$line;;
(displayName:) displayName=$line;;
(street::) street=$(openssl enc -base64 -d <<< "$line" | tr '\n'...
534
Posted By MadeInGermany
The previous post boils down to printf...
The previous post boils down to
printf "$(printf "\\%o" 0x41)\n"So converting the filenames with dash (or ksh) is
ls | sed 's/../ 0x&/g' | while read a; do printf "$(printf "\\%o" $a)\n"; done
740
Posted By MadeInGermany
Thanks for showing it. But... in both loops...
Thanks for showing it.
But...
in both loops exactly the same command? That does not make sense.
What is <bundleID>?
534
Posted By MadeInGermany
In Unix in bash or zsh you can convert a hex...
In Unix in bash or zsh you can convert a hex number to ascii character with e.g.
printf "\x52\n"Provided the ls command displays the current names, you can display the ascii names with
ls | sed...
531
Posted By MadeInGermany
The echo command is not portable. Use printf...
The echo command is not portable.
Use printf "%s\n" instead.
cat check.sh
str=`printf "%s\n" "$1" | sed -e 's#\\\\n# #g'`
printf "%s\n" "$str"
str=$(printf "%s\n" "$1" | sed -e 's#\\\\n# #g')...
Forum: Shell Programming and Scripting 2 Weeks Ago
531
Posted By MadeInGermany
I think you suffer from the \ handling within...
I think you suffer from the \ handling within `backticks`
Demonstration:
cat check.sh
str=`echo "$1" | sed -e 's#\\\\n# #g'`
echo "$str"
str=$(echo "$1" | sed -e 's#\\\\n# #g')
echo "$str"bash...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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