Johnny_Robot Posted October 31, 2012 Share Posted October 31, 2012 Hi guys, I'm trying to learn bash scripting and I've got a little problem that I thought maybe you could help with. Here's the jest of it.... I have a command line tool called "xprop"that displays the properties of an image file. "xprop" results look something like this... Image_name: This is the file name. Image_Resolution: This is the image resolution. Image_Channels: This is the number of image channels. Channel_Types: This is the channel types. Bit_Depth: This is the bit depths. My question is, using this "xprop" script file, what do you think the best way would be to display only the File name and Resolution that the "xprop" script returns for all the image files in my current directory, and then send that output data to a new text document? Any help would be amazing! ;) Thanks for this channel. It's amazing! peace Quote Link to comment Share on other sites More sharing options...
Mr-Protocol Posted October 31, 2012 Share Posted October 31, 2012 I'm a little rusty, but try this. xprop | awk '/Image_name/' \n '/Image_Resolution/' > output.file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.