- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2021 11:01 AM - edited 09-29-2021 11:25 AM
Hi all, newbie to scripting and Jamf, so please bear with me here.
I would like to create a script that pulls a config file for our VPN client and places it in the users library/application support/application/config folder. I think the script would be as follows:
#!/bin/bash
curl https://website.com/place/file.plist -o ~/Library/Application\ Support/ApplicationName/Config/file.plist
Does this look like it would work to download to the users Library folder?
Edit: input the -o in the middle of the curl line, forgot to input that there!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2021 11:19 AM - edited 09-29-2021 11:47 AM
You'd probably want to use the absolute path here with the user's name plugged in as a variable, so something like:
Also don't forget the quotes around the destination path since there are spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2021 11:19 AM - edited 09-29-2021 11:47 AM
You'd probably want to use the absolute path here with the user's name plugged in as a variable, so something like:
Also don't forget the quotes around the destination path since there are spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-29-2021 11:33 AM
Just tried running this in terminal by typing sh /locationofthisscript.sh and hitting enter, but got a 'awk: syntax error at line 1 . Was there something in there about an emoji?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-29-2021 11:40 AM
Sorry, weird editing issue. I think it's fixed now. And I see you did have -o for output there already.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-29-2021 11:43 AM
So ran that as well and the output was the same unfortunately. Just wondering though, what does this emoji have to do with pulling the current users account name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-29-2021 11:49 AM
It's because I apparently can't figure out the text formatting - I'm not sure how it ended up there. I think this new edit should be better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-29-2021 12:03 PM
OHHH I googled the beginning part of it and the emoji is = colon forward slash. When you input that in this text field, the formatting changes it automatically. 😋 I input the change to the script and it worked! Thanks!!
