Page 1 sur 1

grep '^a'

Posté : mar. 02 sept. 2014, 15:44:22
par thx
Bonjour,

je n'arrive pas a faire fonctionner "^" comme marqueur de début de ligne pour grep via Qshell, en V6R1, alors qu'à priori cela ne devrait pas être un problème (http://www.volubis.fr/Pausecaf/PAUSECAF34.htm).

Peut-être auriez-vous une suggestion ?

Merci

CCSID

Posté : mar. 02 sept. 2014, 16:06:11
par cmasse
Que contient la valeur système QCCSID ?

si c'est 65535, un CHGJOB CCSID(297) avant de lancer QSH change-t-il qqchose ?

(sans texte)

Posté : mer. 03 sept. 2014, 13:13:02
par thx
Merci pour ce retour.

QCCSID est bien à 65535, mais le CHGJOB CCSID(297) ne change pas les choses.

Pas trouvé grand chose sur le sujet, juste des traces de "bizarreries" sans plus d'explication... :
Here are some regular expressions that I couldn't get to work under Qshell [...]
'^a' Lines that begin with the letter a
(http://www.itjungle.com/mpo/mpo022802-story03.html)
Extended Regular Expressions (ERE):
^ Align the match from the beginning of the line. (NOTE: This character may not work correctly from a 5250 terminal session.)
(https://publib.boulder.ibm.com/iseries/ ... z/grep.htm)

(sans texte)

Posté : mer. 03 sept. 2014, 13:31:07
par cmasse
je ne comprend pas

avec ce fichier

Code : Tout sélectionner

 Sender: infos@volubis.fr                               
 Date: Thu, 10 Jul 2014 15:31:01 +0200                  
 From&#58; VOLUBIS <infos@volubis.fr>                       
 MIME-Version&#58; 1.0                                      
 To&#58; xxxxxxxxxxxxxxxxxxxxxxxxxxxx
 Subject&#58; Formations de Septembre                       
 Message-Id&#58; <20140710153101924000.infos@volubis.fr>    
 Content-Type&#58; multipart/mixed;                         
  boundary="----PART.BOUNDARY.1"                        
cette commande fonctionne

Code : Tout sélectionner

cat j628986.t153101924000  | grep S         

Sender&#58; infos@volubis.fr                    
From&#58; VOLUBIS <infos@volubis.fr>            
Subject&#58; Formations de Septembre            
$
celle ci aussi

Code : Tout sélectionner

cat j628986.t153101924000  | grep '^S'        
    
Sender&#58; infos@volubis.fr                          
Subject&#58; Formations de Septembre                  
$