The UNIX and Linux Forums  

Go Back   UNIX e Linux Forum > Inizio Forum > Shell scripting e di programmazione
.
google unix.com



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
scripting - scrivere uno script che si conta il numero di volte che una determinata parola BigTool4u2 Shell scripting e di programmazione 3 06-24-2009 02:46 PM
script SQL aiutare sam786 Shell scripting e di programmazione 3 12-10-2007 12:31 PM
differenza tra AIX e Unix shell scripting di shell scripting. haroonec Shell scripting e di programmazione 2 04-12-2006 09:12 AM
scripting guru del pls help me con lo scripting su AIX thatiprashant Shell scripting e di programmazione 1 01-20-2006 07:58 PM
Scripting? woofie What's on Your Mind? 1 03-09-2005 07:03 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Cerca in questo Thread Rate Thread Modalità di visualizzazione
  #1 (permalink)  
Old 04-15-2008
praveenbvarrier praveenbvarrier is offline
Utente Registrato
  
 

Iscriviti Data: aprile 2008
Interventi: 15
ksh scripting aiutare

Ho il file come di seguito

server1 non dr aix 5300-05-03 9119-595 20-18888 sì ftp-aquila
server2 non dr aix 5300-05-03 9119-595 20-18888 sì ftp-aquila
server3 sì dr aix 5300-05-03 9119-595 20-18888 sì ftp-aquila
server4 sì dr aix 5300-05-03 9119-595 20-18888 sì ftp-aquila


Quando ho eseguito dalla shell di seguito: --
# FileName \u003d / list.config
# $ cat nome_file | grep-v "#" | sed -e 's / / / g' | awk '(print $ 1, $ 2)' | grep-w sì | cut-d ''-f1
server3
server4

Ora, quando ho eseguito dalla shell script in questo modo: --
#! / bin / ksh
FileName \u003d / list.config
awkfilter \u003d "$ 1, $ 2"
filter_string \u003d "yes"
temp_str \u003d ($ cat nome_file | grep-v "#" | sed -e 's / / / g' | awk '(print' $ awk_filter ')' | grep-w "$ temp_str1 $ Filter_String" | cut-d ''-f1)
echo $ temp_str
#######

che non è la stessa di cui sopra che mi ha dato in uscita dal serbatoio.

Il set-x per il gatto nello script è il seguente: --
+ + Cat / list.config
+ Grep-v #
+ sed -es / / / g
+ Awk (print $ 1, $ 2)
+ Cut-d-f1
+ Grep-w sì
temp_str \u003d
+ Eco



Posso per favore qualcuno mi aiuta a trovare il motivo per cui il suo lavoro non all'interno dello script?

Ultimo a cura di praveenbvarrier; al 04/15/2008 10:48 AM..
 

Segnalibri

Thread Tools Cerca in questo Thread
Cerca in questo Thread:

Ricerca Avanzata
Modalità di visualizzazione Vota questo thread
Vota questo thread:

Distacco regolamento
Tu non può post nuovo thread
Tu non può inviare una risposta
Tu non può postare allegati
Tu non può modificare i tuoi post

BB codice è Su
Smilies sono Su
[IMG] codice Su
Codice HTML è Chiuso
Trackbacks sono Su
Pingbacks sono Su
Refbacks sono Su




Tutti gli orari sono GMT -4. La data di oggi è 04:00 PM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Limited. Traduzioni Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
UNIX e Linux Forum Content Copyright © 1993-2009. Tutti i diritti Reserved.Ad di gestione da RedTyger

Contenuti pertinenti URL da vBSEO 3.2.0