Sponsored Content
Top Forums Shell Programming and Scripting Passing gunzipped filename to a variable Post 302671765 by hergp on Saturday 14th of July 2012 12:43:22 PM
Old 07-14-2012
gunzip does not write anything to stdout that could be assign to the variable f. If you just want to assign the filename without the .gz suffix to f, write:
Code:
f=`basename filename .gz`

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

passing a variable inside a variable to a function

I would like to know how to pass a variable inside a variable to a function. sample code below -------------- for x in 1 9 do check_null $C$x ##call function to check if the value is null if then echo "line number:$var_cnt,... (2 Replies)
Discussion started by: KingVikram
2 Replies

2. Shell Programming and Scripting

mv Filename variable to another filename

Anyone who can assist : I am trying to pass the group vairiable to a filename: rpt_tsavegrp=/export/legato/scripts/$group_savegrp_rpt.$dat It will not pass to variable. Anyone have any ideas what I am doing wrong here. Thanks # This script sends email that save group completed.... (3 Replies)
Discussion started by: gzs553
3 Replies

3. Shell Programming and Scripting

Passing Filename as a Parameter to Another script

Hi, I have a requirement to write a script file(script1.sh) to read the file from the folder say /usr1/profiles/active and pass the file name as a parameter to another script file say (script2.sh) which would subsitute this parameter. The script2.sh will have a line like the one below ... (1 Reply)
Discussion started by: ravisg
1 Replies

4. Shell Programming and Scripting

passing a variable inside another variable.

Any help would be great. I know this is a dumb way of doing this, but I would like to know if there is a solution doing it this way. I'm very new at this and I'd like to learn more. Thanks! :D:D count=0 while ; do echo "enter your name" read name_$count let count=count+1 done ... (2 Replies)
Discussion started by: reconflux
2 Replies

5. Shell Programming and Scripting

variable used as filename

Hello, i'm fairly new to scripting, so please bear with me (I did try looking this up first, i figured it had to have been asked already). #!/bin/bash fileName=`date | sed -n 's/ /_/g p' | sed -n 's/^/Backup_/p' | sed -n 's/$/\.tar/p'`; #THIS SETS BACKUP_DATE echo $fileName #TEST OF VALUE ... (4 Replies)
Discussion started by: jzacsh
4 Replies

6. Shell Programming and Scripting

Passing filename as parameter and displaying the file contents

Hi All, Its extremely urgent regarding the following requirement. I have created few files in a directory. I have write a program in shell scripting such that it prompts for the filename . once the filename is entered,it should print the contents of the file. Can anyone help with... (7 Replies)
Discussion started by: radhi2424
7 Replies

7. Shell Programming and Scripting

Passing filename dynamically in SPOOL of SQL*PLUS in shell script

Hi all, I am executing shell script in which I am using SQLLDR In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following Spool... (2 Replies)
Discussion started by: shekharjchandra
2 Replies

8. Shell Programming and Scripting

Passing dynamic variable within another variable.

I have a small program which needs to pass variable dynamically to form the name of a second variable whose value wil be passed on to a third variable. ***************** Program Start ****************** LOC1=/loc1 PAT1IN=/loc2 PAT2IN=/loc3 if ; then for fpattern in `cat... (5 Replies)
Discussion started by: Cyril Jos
5 Replies

9. UNIX for Advanced & Expert Users

Passing variable as input & storing output in other variable

I have a below syntax its working fine... var12=$(ps -ef | grep apache | awk '{print $2,$4}') Im getting expected output as below: printf "%b\n" "${VAR12}" dell 123 dell 456 dell 457 Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies

10. Programming

Python passing filename through argument

Hello, A python beginner question on passing filename thru argument. My code is: #!/usr/bin/python import sys, getopt import os def main(argv): try: opts, args = getopt.getopt(sys.argv,"hi:o:ce", ) except getopt.GetoptError: usage() print("Usage: %s... (6 Replies)
Discussion started by: yifangt
6 Replies
MPSImageDescriptor(3)					 MetalPerformanceShaders.framework				     MPSImageDescriptor(3)

NAME
MPSImageDescriptor SYNOPSIS
#import <MPSImage.h> Inherits NSObject. Class Methods (__nonnull instancetype) + imageDescriptorWithChannelFormat:width:height:featureChannels: (__nonnull instancetype) + imageDescriptorWithChannelFormat:width:height:featureChannels:numberOfImages:usage: Properties NSUInteger width NSUInteger height NSUInteger featureChannels NSUInteger numberOfImages MTLPixelFormat pixelFormat MPSImageFeatureChannelFormat channelFormat MTLCPUCacheMode cpuCacheMode MTLStorageMode storageMode MTLTextureUsage usage Detailed Description MPSImage.h MPSCore.framework Copyright: Copyright (c) 2015-2017 Apple Inc. All rights reserved. A MPSImage is a MTLTexture abstraction that allows for more than 4 channels, and for temporary images. This depends on Metal.framework A MPSImageDescriptor object describes a attributes of MPSImage and is used to create one (see MPSImage discussion below) Method Documentation + (__nonnull instancetype) imageDescriptorWithChannelFormat: (MPSImageFeatureChannelFormat) channelFormat(NSUInteger) width(NSUInteger) height(NSUInteger) featureChannels Create a MPSImageDescriptor for a single read/write cnn image. + (__nonnull instancetype) imageDescriptorWithChannelFormat: (MPSImageFeatureChannelFormat) channelFormat(NSUInteger) width(NSUInteger) height(NSUInteger) featureChannels(NSUInteger) numberOfImages(MTLTextureUsage) usage Create a MPSImageDescriptor for a read/write cnn image with option to set usage and batch size (numberOfImages). Property Documentation - channelFormat [read], [write], [nonatomic], [assign] The storage format to use for each channel in the image. - cpuCacheMode [read], [write], [nonatomic], [assign] Options to specify CPU cache mode of texture resource. Default = MTLCPUCacheModeDefaultCache - featureChannels [read], [write], [nonatomic], [assign] The number of feature channels per pixel. Default = 1. - height [read], [write], [nonatomic], [assign] The height of the CNN image. The formal height of the CNN image in pixels. Default = 1. - numberOfImages [read], [write], [nonatomic], [assign] The number of images for batch processing. Default = 1. - pixelFormat [read], [nonatomic], [assign] The MTLPixelFormat expected for the underlying texture. - storageMode [read], [write], [nonatomic], [assign] To specify storage mode of texture resource. Storage mode options: Default = MTLStorageModeShared on iOS MTLStorageModeManaged on Mac OSX MTLStorageModeShared not supported on Mac OSX. See Metal headers for synchronization requirements when using StorageModeManaged - usage [read], [write], [nonatomic], [assign] Description of texture usage. Default = MTLTextureUsageShaderRead/Write - width [read], [write], [nonatomic], [assign] The width of the CNN image. The formal width of the CNN image in pixels. Default = 1. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageDescriptor(3)
All times are GMT -4. The time now is 09:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy