Skip to content

kwojcicki/sh-arg-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

sh-arg-to-json

Usage:

Used for transforming argument parameters to a shell/python script into a json blob that can be used in a curl call to a FaaS provider.

kwojcicki@ubuntu:~/workspace/sh-arg-to-json$ ./transform.sh --f param1 --test param2 --file /etc/hostname --fakefile /etc/hostfakename
{ "--f": "param1", "--test": "param2", "--file": "ubuntu\n", "--fakefile": "/etc/hostfakename" }

Append @notfile to ensure the potential filename is kept as is

kwojcicki@ubuntu:~/workspace/sh-arg-to-json$ ./transform.sh --test@notfile /etc/hostname
{ "--test@notfile": "/etc/hostname" }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages