Sponsored Content
Top Forums Shell Programming and Scripting Shell script inputs to python Post 303015152 by akil on Thursday 29th of March 2018 05:52:46 AM
Old 03-29-2018
Hi ,
When extracting data from API,there are 2 nested groups having same group name [group:url,title and item with different values].I want to merge these 2 nested groups to 1 or individual nested groups otherwise for each unique site more than 2 records .Please advise

Code:
 {
      "time": 1522224314,
      "customParameters": [
    
        {
          "group": "url",
          "item": "https://www.xxx.a/3990154.html"
        },
        {
          "group": "title",
          "item": "a90189275"
        }
      ],
      "site": "xx877",
      "type": "test",
      "userId": "xx1"
    },

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Hi Python and shell script,the script hangs

Hi I need to run a shell script from a TCL script,the shell script in trun will run a python script 1.Tcl script set filename "./GopiRun.sh" 2.GopiRun.sh python ./psi.py $MYSB/test_scripts/delivery/gpy1.py 3.I have my gpy1.py script. Here the problem i am facing is on running... (0 Replies)
Discussion started by: nathgopi214
0 Replies

2. Shell Programming and Scripting

passing argument to shell script that reads user inputs

Hi, Lets say I have a script "ss" which does this read abc echo $abc read pqr echo $pqr Now if I want to pass and argument to only "abc" how do I do it. If I do echo "somevalue" | ss, it does not prompt for pqr and its value comes out as blank. Any help is appreciated Thanks P (6 Replies)
Discussion started by: patjones
6 Replies

3. Shell Programming and Scripting

Passing variable from shell script to python script

I have a shell script main.sh which inturn call the python script ofdm.py, I want to pass two variables from shell script to python script for its execution. How do i achieve this ????? Eg: main.sh a=3 b=3; c= a+b exec python ofdm.py ofdm.py d=c+a Thanks in Anticipation (4 Replies)
Discussion started by: shashi792
4 Replies

4. Shell Programming and Scripting

Need a shell script which takes two inputs and copy the files from one directory to other

Hi, I am using solari 10 OS which is having bash shell. I need a shell script which takes user home directory and name of the file or directory as a input and based on that copy the files accordingly to the other directory. example:I hava a machine1 which is having some files in a... (8 Replies)
Discussion started by: muraliinfy04
8 Replies

5. Shell Programming and Scripting

How to skip the first line of the script in shell using python?

How to skip first line of the script in shell, using python. (3 Replies)
Discussion started by: KarthikPS
3 Replies

6. UNIX for Dummies Questions & Answers

How to give multiple inputs to a shell script

Got struck while trying to write a shell script which should automatically give input. While running a script for eg: (adpatch.sh) It Prompts for Multiple inputs like: Do you currently have files used for installing or upgrading the database installed in this APPL_TOP ? need to give... (2 Replies)
Discussion started by: abdmoha
2 Replies

7. UNIX for Dummies Questions & Answers

How to send keyboard inputs toa UNIX command executed from a shell script?

I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies

8. Programming

Regarding Python Program with Shell Script

Hi All, I have written a shell script which is using the expect method, it is working fine in terminal window, and then I have executed via python script its also working fine in command prompt functioning properly, I used subprocess.Popen method to execute the shell script file, its working... (0 Replies)
Discussion started by: janaefx
0 Replies

9. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

10. UNIX for Beginners Questions & Answers

UNIX Shell Script to Remove MongoDB Document-Based on Many inputs

Here I am in a position to write a Unix Shell script(.sh) to remove MongoDB collection documents. I know how to remove based on a condition like below and it works for me. eval 'db.Collection.remove({TimeStamp:{$lte: "'$var'"}}) But I need to change the remove statement based on a new parameter... (1 Reply)
Discussion started by: senthilmadhanT
1 Replies
Munin::Master::Group(3pm)				User Contributed Perl Documentation				 Munin::Master::Group(3pm)

NAME
Munin::Master::Group - Holds information on host groups. Groups can be nested. METHODS
new my $group = Munin::Master::Group->new($name, $parent); Constructor. $name is the name of the group. add_attributes $group->add_attributes(\%attrs); Sets attributes %attrs for the group. Valid attributes are: node_order Override the order of the hosts within the group. local_address The local address the update process should bind to when contacting the nodes in this group. contacts The contacts for this group. See http://munin-monitoring.org/wiki/HowToContact <http://munin-monitoring.org/wiki/HowToContact>. An exception will be thrown if invalid attributes are provided. (Full details here: http://munin-monitoring.org/wiki/munin.conf#Groupleveldirectives <http://munin- monitoring.org/wiki/munin.conf#Groupleveldirectives>.) add_host $group->add_host($host); Adds host $host to the group. give_attributes_to_hosts $group->give_attributes_to_hosts(); Propagates the attributes of $group to all hosts in the group. (This does not apply to hosts belonging to sub-groups.) get_all_hosts my @hosts = $group->get_all_hosts(); Returns the list of all hosts associated with this group, including those belonging to any sub-groups. perl v5.14.2 2013-11-12 Munin::Master::Group(3pm)
All times are GMT -4. The time now is 10:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy