![]() |
Ciao e benvenuto da parte degli Stati Uniti al UNIX e Linux Forum! Grazie per la visita ed unirsi alla nostra Comunità Globale.
|
|
google unix.com
|
|||||||
| Forum | Registrati | Regole Forum | Collegamenti | Album | FAQ | Members List | Calendario | Ricerca | Today's Posts | Mark Forums Read |
| Shell scripting e di programmazione Pubblica domande su KSH, CSH, SH, Bash, Perl, PHP, sed, awk e da altri script di shell e linguaggi di scripting shell qui. |
Più di UNIX e Linux Forum Argomenti potreste trovare utili
|
||||
| Filo | Thread Starter | Forum | Risposte | Ultimo Post |
| Shell Script awk di errore: "Errore di sintassi:` Split 'inatteso | Herry | UNIX for Dummies Domande & Risposte | 2 | 03-17-2008 11:16 AM |
| errore in fase di esecuzione: St9bad_alloc - Ottenere questo errore durante l'utilizzo di alcuni conversione progr | sathu_pec | Shell scripting e di programmazione | 1 | 01-21-2008 02:38 AM |
| Ho avuto come errore ... errore di sintassi sulla linea 1, teletype | koti_rama | UNIX e avanzata per utenti esperti | 2 | 07-07-2007 07:35 PM |
| errore di lettura sezioni di errore durante l'installazione | doelman | SUN Solaris | 2 | 02-05-2007 12:21 PM |
| Errore: Errore interno di sistema: Impossibile inizializzare il file di output standard | firkus | UNIX for Dummies Domande & Risposte | 2 | 10-25-2005 03:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Cerca in questo Thread | Rate Thread | Modalità di visualizzazione |
|
|
|
||||
|
Errore quando si utilizza sed
Salve,
Ho un file di input con i seguenti contenuti -------------------------------------------------- ------- Esegui Numero: 1 --------------------------------------- -------------------- test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Iniziare | 05/28/2007 02:19:30 | TEST | 8651 -------------------------------------------------- ------- OUT_FILE ------------------------------------------ ----------------- item_id | status_desc | descrizione test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Completato | 05/28/2007 02:19:33 | TEST | 8651 -------------------------------------------------- ------- Esegui Numero: 2 --------------------------------------- -------------------- test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Iniziare | 05/28/2007 02:27:25 | PROVA | 24745 -------------------------------------------------- ------- OUT_FILE ------------------------------------------ ----------------- item_id | status_desc | descrizione test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Completato | 05/28/2007 02:27:27 | PROVA | 24745 -------------------------------------------------- ------- Esegui Numero: 3 --------------------------------------- -------------------- test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Iniziare | 05/28/2007 02:56:32 | TEST | 5560 -------------------------------------------------- ------- OUT_FILE ------------------------------------------ ----------------- item_id | status_desc | descrizione test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Completato | 05/28/2007 02:56:34 | TEST | 5560 -------------------------------------------------- ------- Esegui Numero: 4 --------------------------------------- -------------------- test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Iniziare | 05/28/2007 02:57:32 | PROVA | 11961 -------------------------------------------------- ------- OUT_FILE ------------------------------------------ ----------------- item_id | status_desc | descrizione test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Completato | 05/28/2007 02:57:33 | PROVA | 11961 -------------------------------------------------- ------- Esegui Numero: 5 --------------------------------------- -------------------- test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Iniziare | 05/28/2007 04:17:31 | PROVA | 24685 -------------------------------------------------- ------- OUT_FILE ------------------------------------------ ----------------- item_id | status_desc | descrizione test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] | Completato | 05/28/2007 04:17:33 | PROVA | 24685 Ingresso allo script sarà test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt] Il mio compito è quello di estrarre l'ultimo evento di espressione che è da IP_EXPR | Started tp IP_EXPR | Completato Ho provato con sed ma si dà il seguente errore sed: Espressione-e # 1, char 40: caratteri extra dopo il comando In seguito è il mio codice PI \u003d "test_run-layout test_vaal-i [/ x/TEST/batch/temp/20070528_ip.txt / x/TEST/batch/temp/20070528__op.txt]" IP_FILE \u003d "prova.txt" EXPR \u003d `echo $ IP | sed 's / \ [/ / g' | sed 's / \] / / g' ` echo "EXPR è: $ () EXPR" ESTRATTO \u003d `cat $ IP_FILE | sed 's / \ [/ / g' | sed 's / \] / / g' |sed 's / /! / g' | sed -n "/ $ () EXPR EXPR }/,/${ / p" ` echo "ESTRATTO è: $ () ESTRATTO" Qualcuno mi può aiutare in questo Raghu |
![]() |
| Segnalibri |
| Thread Tools | Cerca in questo Thread |
| Modalità di visualizzazione | Vota questo thread |
|
|