aboutsummaryrefslogtreecommitdiff
path: root/challenge-207/kjetillll/scala/ch-1.sh
blob: cb7119989db7c75988652467f76891d938fa7d3b (plain)
1
2
3
4
5
6
7
8
#!/usr/bin/env scala                                                                                                                                                                          
println( "Input: " + args.toList )  // input from command line arguments
println( "Output: " + args.toList.filter( "(?i)([qwertyuiop]+|[asdfghjkl]+|[zxcvbnm]+)".r matches _ ) )

// chmod +x ch-1.sh
// ./ch-1.sh Hello Alaska Dad Peace
// Input: List(Hello, Alaska, Dad, Peace)
// Output: List(Alaska, Dad)