Jump to content

Search the Community

Showing results for tags 'for'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 1 result

  1. Hi folks, I manage to create the following script in php that's working. The aim is to extract and use multiple parameters from a single {query}. Here's a simplified example: $query = explode(' ', '{query}'); $elemA = $query[0]; $elemB = $query[1]; $elemC = $query[2]; echo "{$elemA}{$elemB}{$elemC}"; I would like to do the same in bash but cannot manage to get it work. Here's my try: This one is working outside Alfred, directly for my Terminal. Basically, it also automatically detect any space as a separator. query="{query}" i=1 for param in $query; do case $i in 1) elemA=$param;; 2) elemB=$param;; 3) elemC=$param;; esac i=$[i+1] done echo "${elemA}${elemB}${elemC}" From all my tries, I've not been able to enter the "for" loop statement… Would you have any idea? Thanks in advance, Cheers, Édouard.
×
×
  • Create New...