Search Results

Search: Posts Made By: MadeInGermany
262
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.
231
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" =...
231
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 3 Days Ago
160
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 5 Days Ago
312
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
488
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.
359
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
256
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,585
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...
256
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
567
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
515
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...
567
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
...
304
Posted By MadeInGermany
Try something with getent passwd That works...
Try something with
getent passwd
That works on many OS.
418
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.
334
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:...
418
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'...
497
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
692
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>?
497
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...
484
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')...
484
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...
118
Posted By MadeInGermany
$1 $2 are positional parameters of the shell. ...
$1 $2 are positional parameters of the shell.
Use "quotes" around them to substitute them by their values, but protect the result from further expansions.
Use 'ticks' to get a $1 $2 literally.
For...
Forum: Linux 1 Week Ago
480
Posted By MadeInGermany
A non-interactive password/passphrase/key...
A non-interactive password/passphrase/key authentication requires full trust of the involved tools.
Openssl/Openssh? Okay, can be trusted. But Google? And do you trust the 2nd factor device?
Showing results 1 to 25 of 500

 

Featured Tech Videos

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