Search Results

Search: Posts Made By: Chubler_XL
133
Posted By Chubler_XL
I voted for the 6/7 letter word option for a...
I voted for the 6/7 letter word option for a couple of reasons. I feel the command(s) would be more self-documenting with longer names. Google, searches, etc for command will avoid false positives...
1,155
Posted By Chubler_XL
Check your manual for rpmbuild, specifically the...
Check your manual for rpmbuild, specifically the --target PLATFORM option. As Neo pointed out you will need some 32 bit libraries installed on your 64 bit OS to be available to do this cross...
833
Posted By Chubler_XL
Ensure dollar variable to be expanded is outside...
Ensure dollar variable to be expanded is outside of single quotes eg:
echo 'File not found in '"$PWD"', please re-enter'

In your script you would do:

for i in `cat file1`
do
...
Forum: Solaris 12-19-2019
1,680
Posted By Chubler_XL
Discussion moved to Solaris area, you will find...
Discussion moved to Solaris area, you will find more people with the Solaris specific knowledge to answer this question here.
757
Posted By Chubler_XL
Firstly the posted script seems to be missing...
Firstly the posted script seems to be missing single quote at the start of the awk code, and two single quotes at the end.

Also your system is reporting that nawk is not installed nawk is usually...
819
Posted By Chubler_XL
You could you an awk script like this: awk...
You could you an awk script like this:

awk -F$'\t' '
NR>1 {
H=H OFS $2
V=$3
$0=$1
$NR=V
L[NR] = $0
}
END {
print "Date_Time" H
for(i=2; i in L; i++) print L[i]
...
798
Posted By Chubler_XL
Rather than using sed to change your original...
Rather than using sed to change your original template file and then change it back why not create a new file with the changes and remove once you are done. Here I use $$ which expands to shells...
110
Posted By Chubler_XL
/LISTEN/ && ! /127.0.0.1/ Match lines...
/LISTEN/ && ! /127.0.0.1/
Match lines containing LISTEN and not 127.0.0.1

gsub("::", "ALL", $0)
Replace :: with ALL on entire line

if ($4 ~ ":") { RECV[$2] }
if field #4 contains : store...
947
Posted By Chubler_XL
Your encode should pretty much be the same...
Your encode should pretty much be the same function as your decode, just use crypt array instead of decrypt:


encode ()
{
local word=$1
while [[ $word ]] ;
do
local code
...
110
Posted By Chubler_XL
This should be close to what you were doing. ...
This should be close to what you were doing.

netstat -an | awk '
/LISTEN/ && ! /127.0.0.1/ {
gsub("::", "ALL", $0)
if ($4 ~ ":") { RECV[$2] }
}
/ESTABLISHED/ && ($2 in RECV) {
...
878
Posted By Chubler_XL
using awk: awk -F\| ' FNR == NR { col[$0];...
using awk:

awk -F\| '
FNR == NR { col[$0]; next}
{
for(i=1;i<=NF;i++)
if(!($i in col)) {
printf "%s%s",sep, $i;
sep="|"
}
printf "\n"
}
' array2.txt FILE1

Using bash...
1,080
Posted By Chubler_XL
You may find this on-line version of "The Are of...
You may find this on-line version of "The Are of Unix Programming" useful:

The Art of Unix Programming (http://www.catb.org/~esr/writings/taoup/html/)

A quick google search for "Bash tips...
1,046
Posted By Chubler_XL
My first guess would be the PATH variable doesn't...
My first guess would be the PATH variable doesn't contain the folder where jq is stored. I'd try specifying a PATH in your script:

Find where jq is installed eg:
$ type jq
jq is hashed...
1,046
Posted By Chubler_XL
There are a couple of things I'm a little unhappy...
There are a couple of things I'm a little unhappy with in my proposed solution and I'd like to update to a more robust version.

Firstly if the JSON structure contains array of objects decend()...
1,431
Posted By Chubler_XL
Never used qsub but I'd be tempted to use: ...
Never used qsub but I'd be tempted to use:

if [ -z "$StatedUserName" ] ; then

to test for a blank/missing StatedUserName variable
135
Posted By Chubler_XL
Welcome to the forums. If you are not...
Welcome to the forums.

If you are not expecting the directories to already be there (eg running the script multiple times against the same input file), you could test for the existence and...
1,046
Posted By Chubler_XL
The normal practice would be to redirect to a...
The normal practice would be to redirect to a temporary file and then move the temp file over the original.

jq -c '.....' infile > /tmp/jqtemp.$$ && mv -f /tmp/jqtemp.$$ infile
1,046
Posted By Chubler_XL
It's not valid to have same key multiple times in...
It's not valid to have same key multiple times in the one record. Try running your input thru a JSON validator (https://jsonformatter.curiousconcept.com/)
1,046
Posted By Chubler_XL
After reading your request again it appears you...
After reading your request again it appears you want to identify an IP addresses in any non-array JSON data array and convert it to an array.

input :
{"adaptor" : "ip01" , "gateway" :...
1,046
Posted By Chubler_XL
Not a big expert on jq but with a bit of playing...
Not a big expert on jq but with a bit of playing around I got this to work:

jq 'if .network_ip_v4_address | type == "string" then .network_ip_v4_address |= [ . ] else . end' infile
807
Posted By Chubler_XL
known_hosts is for the client side ssh-copy-id...
known_hosts is for the client side ssh-copy-id will not change the servers known_hosts file


id_rsa and id_rsa.pub are generated by ssh-keygen on the server side, these would be used to another...
1,080
Posted By Chubler_XL
Welcome to the forum, firstly some housekeeping ...
Welcome to the forum, firstly some housekeeping
...
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post...
1,294
Posted By Chubler_XL
RudiC although your replace works for ~/dir/path...
RudiC although your replace works for ~/dir/path it would not work for ~root/data/mydatafile or /home/dba/data~files/myarray.dat.
The function in post #7 supplies a more accurate expansion.
1,294
Posted By Chubler_XL
The problem is ~ is not being expanded. It turns...
The problem is ~ is not being expanded. It turns out to be a little tricky to expand ~ but also avoid word separation on the path name (white spaces in you array source filename).

Try:function...
933
Posted By Chubler_XL
You should still be able to do: $...
You should still be able to do:
$ D2B=({0,1}{0,1}{0,1}{0,1}{0,1}{0,1}{0,1}{0,1})
$ echo ${D2B[256-127]}
or$ echo ${D2B[${#D2B }-127]}
Showing results 1 to 25 of 500

 

Featured Tech Videos

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