Commande équivalent à Sed, awk, tail,head en powershell !
hackmed
Messages postés
8
Statut
Membre
-
zipe31 Messages postés 38797 Statut Contributeur -
zipe31 Messages postés 38797 Statut Contributeur -
Bonjour,
Je fais un script shell qui doit extraire une suite de chiffre.
Voici un exemple ou je chercher a obtenir le chiffre :
S-1-5-21-2266954777-2911002515-1883294743
comme résultat.
la commande est :
PS C:\Users\HACKMED\Searches\Pictures\Documents\script> whoami /ALL
Résultat:
Je fais un script shell qui doit extraire une suite de chiffre.
Voici un exemple ou je chercher a obtenir le chiffre :
S-1-5-21-2266954777-2911002515-1883294743
comme résultat.
la commande est :
PS C:\Users\HACKMED\Searches\Pictures\Documents\script> whoami /ALL
Résultat:
PS C: \ Users \ HACKMED \ Searches \ Pictures \ Documents \ script> whoami / ALL
User Information
------------------------
Username SID
================== ================================ ==============
hackmed-pc \ hackmed S-1-5-21-2266954777-2911002515-1883294743-1000
A voir également:
- Sed command powershell
- Sfc scannow command - Guide
- Virus powershell - Guide
- Command mac - Guide
- Remplacez le mot sed par le mot mais dans tout le texte. combien de caractères contient le document suite à cette modification (en incluant les espaces) ? ✓ - Forum Shell
- | Barre verticale powershell - Forum PowerShell
1 réponse
Salut,
$ cat plop
PS C: \ Users \ HACKMED \ Searches \ Pictures \ Documents \ script> whoami / ALL
User Information
------------------------
Username SID
================== ================================ ==============
hackmed-pc \ hackmed S-1-5-21-2266954777-2911002515-1883294743-1000
$ awk 'END { print $NF }' plop
S-1-5-21-2266954777-2911002515-1883294743-1000