Search Results

Search: Posts Made By: jcdole
105
Posted By jcdole
Copy and past html text use wrong character set - Firefox
Hello.

The source code is here : WMI query to find memory slot and installed memory on each slot...
Forum: Shell Programming and Scripting 2 Weeks Ago
432
Posted By jcdole
Thank you very much --- Post updated at...
Thank you very much

--- Post updated at 21:14 ---


Thank you
Forum: Shell Programming and Scripting 2 Weeks Ago
432
Posted By jcdole
Extracting substring within string between 2 token within the string
Hello.


First best wishes for everybody.


here is the input file ("$INPUT1") contents :
BASH_FUNC_message_begin_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_debug%%=() { local -a...
Forum: Shell Programming and Scripting 3 Weeks Ago
513
Posted By jcdole
Delete a pattern including any whitespace before it and after it
Hello.

A_LIGNE="cnezJ,V ,FMZ fd,Mok CODKJ,F SOME_WORD fcnQ, VMQKV Q"
A_PATTERN="SOME_WORD"
sed 's/'$A_PATTERN'//g' <<< "$A_LINE"will remove 'SOME_WORD' and give :
"cnezJ,V ,FMZ fd,Mok...
Forum: Shell Programming and Scripting 3 Weeks Ago
588
Posted By jcdole
Create a text file and a pdf file from Linux command results.
Hello.


The task :
Using multiple commands like :
gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file.
For readiness I must insert page break.
When the program is finished I want to...
1,157
Posted By jcdole
Bash find with expression - process all files except the starting-points
Hello.
This command is correct :
find /home/user_install \( \
\( -type d \( -iname "*firefox*" -o -iname ".cache" -o -iname "libreoffice" \
-o -iname "session" -o -wholename...
737
Posted By jcdole
Loading associative array from exported function
Hello.
I have an export of an associative array build using declare -p SOME_ARRAY_NAME > SOME_FILE_NAME.txt.
Producing some thing like declare -A SOME_ARRAY_NAME=( [toto]="some_text" ...
845
Posted By jcdole
Ok I will read what SHELLOPTS is for. But...
Ok I will read what SHELLOPTS is for.

But For my problem, I have found that there is some syntax error(s) in some function(s) ( found using shellcheck ).
If I run my test script from command...
3,722
Posted By jcdole
Thank you every body for helping
Thank you every body for helping
1,235
Posted By jcdole
My test show that does not work for function as...
My test show that does not work for function as Corona688 just said.


Thank you

--- Post updated at 18:06 ---




That mean that any script I run which need to be started with sudo needs...
845
Posted By jcdole
Bash inherits
Hello .
Preamble :
Depending of the opensuse distrib :
Login shell read :

/etc/profile
/etc/profile.local ( for customization )
eventually for specific programms : /etc/profile.d/
...
1,235
Posted By jcdole
Sudo has no access to exported bash function
Hello.
I am running leap 15.1
sudo behavior may differ from other distrib.


I have a file with functions definition

....
function_1 {
echo "Hello world"

}
export -f function_1 This...
3,722
Posted By jcdole
Extract whole word preceding a specific character pattern with first occurence of the pattern
Hello.


Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=([FORCE_IGNORE15]="§" [FORCE_IGNORE17]="§" [FORCE_IGNORE1]="§" [FORCE_IGNORE16]="§" [FORCE_IGNORE11]="§" .....................
2,013
Posted By jcdole
Than k you for your quick posting.3 I...
Than k you for your quick posting.3


I have found this rules when googleing :
if(conditional-expression1)
action1;
else if(conditional-expression2)
action2;
else...
2,013
Posted By jcdole
awk - multiple and nested if-then-else
Hello.


I would like to convert the following piece of code from bash to awk.

Here are bash variables in a bash script.

CUR_ROW_ID and ROW_ID_TO_SEARCH contains a string which represent a...
2,494
Posted By jcdole
Thank you everybody fore helping.
Thank you everybody fore helping.
2,494
Posted By jcdole
OK that works awk '/zypper_local/...
OK that works



awk '/zypper_local/ && /60/ && /'$ZYPPER_LOCAL_REP'/'Does not works :
user_install@ASUS-G75VW-JC:~> zypper lr -d | awk '/zypper_local/ && /60/ && /'$ZYPPER_LOCAL_REP'/'
awk:...
2,494
Posted By jcdole
awk - using variables in pattern which contain full pathname
Hello.


I would like to make this bash command working.
In the following code, the bash variable 'ZYPPER_LOCAL_REP' contain a full pathname like '/path/to/path/somewhere'

The command list all...
2,957
Posted By jcdole
Thank you very much
Thank you very much
2,957
Posted By jcdole
The best I have found is : sed...
The best I have found is :
sed 's/§.*§/§2019_08_25§/ ; s/¨.*¨/¨version:34-1-9¨/ ; s/ɸ.*ɸ/ɸmodif_version:9-7-3ɸ/' "$SOME_FILE"But that does not convert :
#!/bin/bash
# ...
2,957
Posted By jcdole
Contrary to what I wrote yesterday, it doesn’t...
Contrary to what I wrote yesterday, it doesn’t quite do what I thought.
In fact it delates from the beginning of the line containing /start/ (complete line) until the end of the line...
2,957
Posted By jcdole
No, because as far as the few I knew about sed : ...
No, because as far as the few I knew about sed :
/^§/ stand for "§" at beginning of line
/ɸ$/ stand for "ɸ" at end of ligne

that is not the case for my file heade






The shebang is at...
2,957
Posted By jcdole
To be more clear, on any files return by the...
To be more clear, on any files return by the command find :
1° The start pattern to search § is generaly at line 11 but should be more or less
2° The start pattern to search § is always on a new...
2,957
Posted By jcdole
Bash script - How to update header of scripts in one pass - multiline search/replace
Hello.
A find command return a list of file.
For each fileReplace the content starting with the first "§" (of two) ending with last "ɸ" (of two), regardless of the content ( five lines )
by the...
4,012
Posted By jcdole
Valid separator in time and date format
Hello.
I can use any particular (stupid or not) format when using bash date command.
Example :
~> date --date "now" '+%Y-%m-%d %H!%M!%S'
2019-06-03 12!55!33or
~> date --date "now" '+%Y£%m£%d...
Showing results 1 to 25 of 209

 

Featured Tech Videos

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