Re: scripting help

2007-09-25 Thread The Wanderer
Reply addresses set by hand to work around broken defaults. (Again.) suser wrote: I am trying to create a script to go through /etc/passwd and change anyone who's home directory is "/mnt/home" to "/mnt/". I have been playing around with loops and regular expressions but have not got anything cl

Re: scripting help

2007-09-25 Thread Andreas Schwab
suser <[EMAIL PROTECTED]> writes: > I am trying to create a script to go through /etc/passwd and change anyone > who's home directory is "/mnt/home" to "/mnt/". This does not really has anything to do with bash, let alone with bugs in bash, so it is rather off-topic here. > Original - user:x:100

scripting help

2007-09-25 Thread suser
nging them all by hand is quite the pain. so basically im trying to do something like the following: Original - user:x:1000:100:user:/mnt/home:/bin/bash what i want - user:x:1000:100:user:/mnt/user:/bin/bash any suggestions? thanks in advance! -- View this message in context: http://www.

Re: bash scripting help

2007-09-13 Thread chitti
NF == 0 || $1 ~ /^#/ {next} > $2 ~ /\/tcp$/ {print > "services.tcp"; next} > $2 ~ /\/udp$/ {print > "services.udp"; next} > {print > "services.other"}' < /etc/services > > > -- > Stéphane > > > > --

Re: bash scripting help

2007-09-12 Thread Stephane CHAZELAS
2007-09-12, 10:00(-07), chitti: > > I need to seperate the UDP and TCP ports from the /etc/services files. > any pointers or help on scripting this in bash would be helpful > thanks awk ' NF == 0 || $1 ~ /^#/ {next} $2 ~ /\/tcp$/ {print > "services.tcp"; next} $2 ~ /\/udp$/ {print > "service

Re: bash scripting help

2007-09-12 Thread Bob Proulx
chitti wrote: > I need to seperate the UDP and TCP ports from the /etc/services files. > any pointers or help on scripting this in bash would be helpful Open ended questions such as that are not the greatest way to get going. It is better if you read one of the many tutorials and howtos that are

bash scripting help

2007-09-12 Thread chitti
I need to seperate the UDP and TCP ports from the /etc/services files. any pointers or help on scripting this in bash would be helpful thanks -- View this message in context: http://www.nabble.com/bash-scripting-help-tf4430729.html#a12639912 Sent from the Gnu - Bash mailing list archive at