Retourner au contenu associé (entrée de forum : Insérer une variable dans un lien sur shell)
Posté par MicP le 16 janvier 2019 à 04:13. En réponse au message Insérer une variable dans un lien sur shell. Évalué à 3. Dernière modification le 16 janvier 2019 à 22:59.
En récupérant le nom du premier fichier à télécharger dans la page web : http://dreamosat.net/oscam/index.php?&direction=1&order=nom&directory=1.20_TRUNK/arm_dm900-solo4k
http://dreamosat.net/oscam/index.php?&direction=1&order=nom&directory=1.20_TRUNK/arm_dm900-solo4k
et en l'assignant à la variable nomFichier :
michel@debg53sw:~$ nomFichier=`wget -q -O- --trust-server-names "http://dreamosat.net/oscam/index.php?&direction=1&order=nom&directory=1.20_TRUNK/arm_dm900-solo4k" | grep -Pom1 '.*?href="index.php\?action=downloadfile\&filename=\K.*?(?=&)'` michel@debg53sw:~$ echo $nomFichier oscam-svn11466-arm_dm900-solo4k-webif-oscam-emu-patched.tar.gz
Pour ensuite insérer la variable nomFichier dans le texte du lien de téléchargement en assignant ce texte à la variable HTTPSERV75 :
michel@debg53sw:~$ HTTPSERV75="http://oscam.dreamosat.net/index.php?action=downloadfile&filename=$nomFichier&directory=1.20_TRUNK/arm_dm900-solo4k&" michel@debg53sw:~$ echo $HTTPSERV75 http://oscam.dreamosat.net/index.php?action=downloadfile&filename=oscam-svn11466-arm_dm900-solo4k-webif-oscam-emu-patched.tar.gz&directory=1.20_TRUNK/arm_dm900-solo4k&
... et dans ce royaume, ceux qui y voient un peu plus clair sont parfois très mal vus.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Ou alors...
Posté par MicP . En réponse au message Insérer une variable dans un lien sur shell. Évalué à 3. Dernière modification le 16 janvier 2019 à 22:59.
En récupérant le nom du premier fichier à télécharger dans la page web :
http://dreamosat.net/oscam/index.php?&direction=1&order=nom&directory=1.20_TRUNK/arm_dm900-solo4ket en l'assignant à la variable nomFichier :
Pour ensuite insérer la variable nomFichier dans le texte du lien de téléchargement
en assignant ce texte à la variable HTTPSERV75 :
... et dans ce royaume, ceux qui y voient un peu plus clair sont parfois très mal vus.