Redirecting command output to input of another command
HI guys,
Sorry I can't wrap my head around this one. So hopefully someone can help. I want to run gsettings list-schemas (which return a list of about 100 names separated by spaces) and somehow direct each name one at a time as the input to this command: gsettings list-recursively I've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input but I am missing something in between I'm sure like for - while or proper syntax of awk etc Can someone help as I would like to be able to save the output of each schema entry to make it easy searching etc Thanks heaps in advance :) |
Not @ my computer to test but you might be able to use shift along with awk. Id google awk shift entries to see if anything comes up.
|
This script should do the job:
Code:
#!/bin/sh Code:
for i in `gsettings list-schemas`; do gsettings list-recursively $i; done |
Thanks heaps man that's just what I was after :D
|
All times are GMT -5. The time now is 02:25 PM. |