How to create files with two or more variables in its names?
Hi all,
Iam writing a perl script to create many files with variables in their name.
i am able to do it, if iam using only one variable. But with two variables the file
names are NOT getting generated in the way i want.
plz help me out.
Here in 2nd case the numbers are the values of $k. But $p_50 is getting ignored. $p is some other variable whose value also varies.
Hi,
I have 2 files which are as follows:
Num:
548983
748932
783928
547383
839284
Grp:
2389
9873
8493
7382
8493
I need to make an output file using both of these files. (1 Reply)
I have created a script that prompts the user to enter three variables that are seperated by a space as the delimiter.
It then performs a command 3 seperate times for each variable entered.
I want the script to llow the user to enter as many variables as they may like and the script to... (5 Replies)
Hi all:
I have a directory where all of the subdirectories are named by the convention "images_#1:#2_Date." My goal is to get an array for each subdirectory that has the structure (#1,#2, int). I am able to use awk to print each subdirectory's values, but cannot figure out how to get them into an... (6 Replies)
I'm an experienced awk user, but this one has me stumped. I have an awk script which is called from a UNIX command line as you'd expect:
myscript.awk -v foo=$1 -v bar=$2 filename
My question is this: is there a mechanism for determining the names of the -v variables within a script?
... (3 Replies)
Hi,
I have requirement to assign values to variables which are created dynamically.
Below is the code which i am using to achieve above requirement.
#!/bin/ksh
oIFS="$IFS"; IFS=','
STR_FAIL_PARENT_IF_FAILS="WF_F_P_IF_FAILS1,WF_F_P_IF_FAILS2,WF_F_P_IF_FAILS3"
set -A... (1 Reply)
Hello everyone
We have a problem about searching and copying files with variables.
we have variables like $year $jday $date and we want to search the files whose name contain these variables.
we tried *$year*$jday*$date or with ? instead of *
thank you everyone!!! (4 Replies)
I'm using korn shell and I am wondering if it's possible to use a parameter passed into a function to build a variable name in a configuration file. I have the function in one source file, I'd like to have a global configuration file instead of hardcoding logins to each script.
So I have a... (7 Replies)
Data files coming in different names in a file name called process.txt.
1. shipments_yyyymmdd.gz
2 Order_yyyymmdd.gz
3. Invoice_yyyymmdd.gz
4. globalorder_yyyymmdd.gz
The process needs to discard all the below files and only process two of the 4 file names available
... (1 Reply)
I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Actually I have one list of channels names like:
Rai 1
Rai 1 +1HD
Rai 1 +2HD
Rai 2
Rai 2 +1HD
Rai 2 +2HD
.
.
.
.From this list of names I need create one new xml file with this structure
<channel id="Rai 1">
<display-name lang="it">Rai 1</display-name>
<icon... (3 Replies)
Discussion started by: Tapiocapioca
3 Replies
LEARN ABOUT DEBIAN
sg_reset
SG_RESET(8) SG3_UTILS SG_RESET(8)NAME
sg_reset - sends SCSI device, target, bus or host reset; or checks reset state
SYNOPSIS
sg_reset [-b] [-d] [-h] [-t] [-V] DEVICE
DESCRIPTION
The sg_reset utility with no options (just a DEVICE) reports on the reset state (e.g. if a reset is underway) of DEVICE. When given a -d,
-t, -b or -h option it requests a device, target, bus or host reset respectively.
The ability to reset a SCSI target (often called a "hard reset" at the transport level) was added in linux kernel 2.6.27 . Low level driv-
ers that support target reset hopefully reset a logical unit only when given the device reset (i.e. -d) option. This should removed the
ambiguity of whether "device" meant LU or target that we have had in the past.
In the linux kernel 2.6 series this utility can be called on sd, sr (cd/dvd), st or sg device nodes; if the user has appropriate permis-
sions.
In the linux kernel 2.4 series support for this utility first appeared in lk 2.4.19 and could only be called on sg device nodes. Various
vendors made this capability available in their kernels prior to lk 2.4.19.
OPTIONS -b attempt a SCSI bus reset. This would normally be tried if the device reset (i.e. option -d) was not successful.
-d attempt a SCSI device reset. If the device seems stuck, this is the first reset that should be tried. This assumes the linux scsi
mid level error handler is not already in the process of resetting DEVICE.
-h attempt a host adapter reset. This would normally be tried if both device reset (i.e. option -d) and bus reset (i.e. option -b) were
not successful.
-t attempt a SCSI target reset. This assumes the linux scsi mid level error handler is not already in the process of resetting the tar-
get that contains the given DEVICE.
-V prints the version string then exits.
NOTES
The error recovery code within the linux kernel when faced with a SCSI command timing out and no response from the device (LU), first tries
a device reset and if that is not successful tries a target reset. If that is not successful it tries a bus reset. If that is not success-
ful it tries a host reset. Users of this utility should check whether such a recovery is already underway before trying to reset with this
utility. The "device,target,bus,host" order is also recommended (i.e. first start with the smallest hammer). The above is a generalization
and exact details will vary depending on the transport and the low level driver concerned.
SAM-4 defines a hard reset, a logical unit reset and a I_T nexus reset. A hard reset is defined to be a power on condition, a microcode
change or a transport reset event. A LU reset and an I_T nexus reset can be requested via task management function (and support for LU
reset is mandatory). In Linux the SCSI subsystem leaves it up to the low level drivers as to whether a "device reset" is only for the
addressed LU or all the LUs in the device that contains the addressed LU (i.e. a target reset). The additional of the target reset (i.e.
option -t) should give more control in this area. The "bus reset" is a transport reset and may be a dummy operation, depending on the
transport. A "host reset" attempts to re-initialize the HBA that the request passes through en route to the DEVICE. Note that a "host
reset" and a "bus reset" may cause collateral damage.
This utility does not allow individual SCSI commands (or tasks as they are called in SAM-4) to be aborted. SAM-4 defines ABORT TASK and
ABORT TASK SET task management functions for that.
Prior to SAM-3 there was a TARGET RESET task management function. Several transports still support that function and many associated linux
low level drivers map the -t option to it.
AUTHORS
Written by Douglas Gilbert.
COPYRIGHT
Copyright (C) 1999-2009 Douglas Gilbert
This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
POSE.
sg3_utils-1.28 July 2009 SG_RESET(8)