fix error in tutos computer open webloc files
This commit is contained in:
@@ -34,6 +34,14 @@
|
|||||||
sed 's/^BASEURL=/URL=/' "$1" | grep -m 1 '^URL=' | sed 's/^URL=//' | sed 's/\r//' | xargs xdg-open
|
sed 's/^BASEURL=/URL=/' "$1" | grep -m 1 '^URL=' | sed 's/^URL=//' | sed 's/\r//' | xargs xdg-open
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
- signification :
|
||||||
|
- for the command "open_url file.URL" :
|
||||||
|
- **$0** : /usr/local/bin/open_url
|
||||||
|
- **$(basename "$0")** : open_url
|
||||||
|
- **$1** : file.URL
|
||||||
|
- the sed command :
|
||||||
|
- **grep -m 1** : tells grep to stop searching after the first match
|
||||||
|
- **xargs** : reads items from standard input and executes a command with those items as arguments
|
||||||
- give execution permission : `chmod +x /usr/local/bin/open_url`
|
- give execution permission : `chmod +x /usr/local/bin/open_url`
|
||||||
- tell the file manager to use this script to open .URL files :
|
- tell the file manager to use this script to open .URL files :
|
||||||
- right click on a .URL file
|
- right click on a .URL file
|
||||||
@@ -42,10 +50,18 @@
|
|||||||
- 'use as default for this kind of file' (or equivalent)
|
- 'use as default for this kind of file' (or equivalent)
|
||||||
- open :)
|
- open :)
|
||||||
|
|
||||||
|
|
||||||
**open .webloc files :**
|
**open .webloc files :**
|
||||||
- see above 'open .URL files'
|
- see above 'open .URL files'
|
||||||
- change this line in the script :
|
- in the script change the line "sed..." by this :
|
||||||
grep -m 1 -oP '(?<=<string>).*?(?=<\/string>)' repas_4_etoiles.webloc | xargs xdg-open
|
grep -m 1 -oP '(?<=<string>).*?(?=<\/string>)' "$1" | xargs xdg-open
|
||||||
|
- signification :
|
||||||
|
- **-m 1** : tells grep to stop searching after the first match
|
||||||
|
- **-o** : tells grep to print only the matching portion of the line
|
||||||
|
- **-P** : this option enables Perl-compatible regular expressions, which support lookaheads and lookbehinds
|
||||||
|
- **(?<=<string>)** : this is a positive lookbehind that matches the position immediately after <string>.
|
||||||
|
- **.*?** : this matches any character (except for a newline) zero or more times, but as few times as possible.
|
||||||
|
- **(?=<\/string>)** : this is a positive lookahead that matches the position immediately before </string>
|
||||||
|
|
||||||
|
|
||||||
**pdftotext** transforme un pdf en un fichier texte
|
**pdftotext** transforme un pdf en un fichier texte
|
||||||
@@ -227,7 +243,7 @@ find | sort | grep -ve "node_modules/" -e ".git/" | sed 's#[^/]*/#|__ #g;s#__ |#
|
|||||||
|
|
||||||
|
|
||||||
**list of automatic settings :**
|
**list of automatic settings :**
|
||||||
- install screen, omyzsh, keepassxc, curl, make, firefox, signal, gnome-tweaks
|
- install screen, omyzsh, keepassxc, curl, make, firefox, signal, gnome-tweaks, ffmpeg, yt-dlp
|
||||||
- install or configure to avoid screen blue light
|
- install or configure to avoid screen blue light
|
||||||
- install nextcloud client (apt ? or appimage ? appimage need fuse : https://github.com/AppImage/AppImageKit/wiki/FUSE), and launch at startup
|
- install nextcloud client (apt ? or appimage ? appimage need fuse : https://github.com/AppImage/AppImageKit/wiki/FUSE), and launch at startup
|
||||||
- install these settings (connection with bitbucket ? ssh ? https ?)
|
- install these settings (connection with bitbucket ? ssh ? https ?)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
**==** rétablit la bonne indentation pour la ligne
|
**==** rétablit la bonne indentation pour la ligne
|
||||||
**=G** rétablit la bonne indentation pour toute la page
|
**=G** rétablit la bonne indentation pour toute la page
|
||||||
**''** go to last cursor position
|
**''** go to last cursor position
|
||||||
**gx** open the file under cursor, or url
|
**gx** open the file under cursor, or url or links
|
||||||
|
|
||||||
/REMPLACER/
|
/REMPLACER/
|
||||||
**:s/old/new** remplace la 1ere occurence de ancien par nouveau
|
**:s/old/new** remplace la 1ere occurence de ancien par nouveau
|
||||||
|
|||||||
Reference in New Issue
Block a user