dCore Import Debian Packages to Mountable SCE extensions > dCore x86 Imported Extensions

Xtc and ~/.X.d/ scripts

(1/3) > >>

Jason W:
I have modified ~/.xinitrc in the Xtc package to execute the scripts in ~/.X.d in order of the starting characters being numbers first, then letters.  So if you want a script to run last, it could be named  for example zzzsettime to run last, or aaasoundsetup to run first.  Scripts starting with numbers will run before those starting with letters and will run in numerical order.   This allows control of the executing order of ~/.X.d/ scripts.

~/.xinitrc is probably in your backup and would need to be removed from it to see this change upon update of Xtc.

MODIFIED:  Spelling

Rich:
Hi Jason W

--- Quote from: Jason W on February 17, 2018, 07:03:34 PM --- ... Scripts starting with numbers will run before those starting with letters and will run in numerical order. ...
--- End quote ---

Is this a true numerical sort or are you using an alphanumerical sort? I ask because unless numbers are padded with leading
zeros to make them all the same width, an alphanumerical sort will do this:

--- Code: ---tc@box:~$ cat 123
1a
1A
11a
11A
12
tc@box:~$ cat 123 | sort
11A
11a
12
1A
1a
tc@box:~$
--- End code ---

Jason W:
Here is the results of the order of files you mentioned -

1/11a
1/11A
1/12
1/1a
1/1A

It is the sort command run on the ~/.X.d/ scripts

Rich:
Hi Jason W
So to prevent things like 11A and 12A from executing before 1A, one should ensure the numeric field is the same width
on all filenames.

Jason W:
Hi Rich. 

'sort -V' produces the below result which seems more what folks would expect.  I will use it in place of 'sort'.


--- Code: ---1A
1a
11A
11a
12
AAA
ZZ
aaax
zzzx

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version