Sponsored Content
Full Discussion: variable used as filename
Top Forums Shell Programming and Scripting variable used as filename Post 302316254 by devtakh on Thursday 14th of May 2009 01:41:48 PM
Old 05-14-2009
I always like to use

Code:
tar -cvf "$filename" tmp/*

keeping in mind that tmp is in the current directory or else give the absolutE PATH.


cheers,
Devaraj Takhellambam
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

AWK Filename as variable

Need some help. I need to load data into some Oracle tables and one of the pieces of data that I need to load is the filename. This filename is distinct every single time. Basically the last 6 characters will be different with no pattern. ex. testfile_041504_003567 To load the filename... (4 Replies)
Discussion started by: firkus
4 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

Variable value not being fetched in the filename..

Hi, In the code below, the $DD1, $DD2, $MM1, $MM2 are not fetching the values. Can anybody tell me where have i made wrong. Shift_date.sh is a script which gives the previous date if we give the current date in the format YYYYMMDD and +/- how many days past/future.. Like Shift_date.sh... (3 Replies)
Discussion started by: RRVARMA
3 Replies

4. UNIX for Dummies Questions & Answers

'Crop' date from filename into a variable

Hi all, I have a scenario as below. I created a file - $touch myfile.onlytesting.20090227.txt I want to assign the date only - 20090227 into a variable x. How do I do this in unix command? Please help. Thanks;) (4 Replies)
Discussion started by: luna_soleil
4 Replies

5. UNIX for Dummies Questions & Answers

assingn a variable a filename and then reading it in

Im trying to set a filename to a variable and then read the file in using the variable but im getting a syntax error. any ideas? #!/bin/bash function scanFile() { while read $1 do echo $filename done } file1=report.log scanFile() $file1 (3 Replies)
Discussion started by: magnia
3 Replies

6. Shell Programming and Scripting

Inserting variable value into filename

Greetings, people of UNIX/Linux forums. I am having a problem with a script, where I am trying to create a new variable. The value of this variable would be dependent on the value in a couple other previous variables (all variables are 2-digit integers). Here is my code: #set the stations... (3 Replies)
Discussion started by: TheSMan5
3 Replies

7. Shell Programming and Scripting

Set the last 4 letter in the filename as a variable

Hi all, I want to set the last 4 letter in the filename as a variable. For example, i have AB1234.txt file and i need to have last 4 letter as a variable. It should be like ; get last four letter set var = 1234 How can i write this in C shell?? Thanks, zibi (3 Replies)
Discussion started by: zibi
3 Replies

8. Shell Programming and Scripting

Change the filename variable value

Hi guys, I have a variable where i am storing the filename (with full path). I just need the value before ".txt". But instead of getting the filename i am getting the contents of the filename. FileName=/appl/data/Input/US/Test.txt a=`awk -F"." '{print $1}' ${FileName}` echo $a... (3 Replies)
Discussion started by: mac4rfree
3 Replies

9. Shell Programming and Scripting

Passing gunzipped filename to a variable

Hi , Am trying to gunzip a file and pass the gunzipped file name to a variable , but its not taking up the value. Am trying to execute the command f=`gunzip <filename>`;echo $f. Here the file is getting gunzipped but the file name is not assigned to the variable. Any help on this will be useful.... (5 Replies)
Discussion started by: rogerben
5 Replies

10. Shell Programming and Scripting

Inserting variable values in filename

Hi All, I have a directory containing multiple files. and also a txt file which contains the list of all filenames and certain values. I want to read the text file line by line and if its 2nd column is matched with the filename in directory, then it must insert the values in 7th column to... (14 Replies)
Discussion started by: CAch
14 Replies
modload(1M)                                               System Administration Commands                                               modload(1M)

NAME
modload - load a kernel module SYNOPSIS
modload [-p] [-e exec_file] filename DESCRIPTION
The modload command loads the loadable module filename into the running system. filename is an object file produced by ld -r. If filename is an absolute pathname then the file specified by that absolute path is loaded. If filename does not begin with a slash (/), then the path to load filename is relative to the current directory unless the -p option is specified. The kernel's modpath variable can be set using the /etc/system file. The default value of the kernel's modpath variable is set to the path where the operating system was loaded. Typically this is /kernel /usr/kernel. For example, the following command looks for ./drv/foo: example# modload drv/foo The following command looks for /kernel/drv/foo and then /usr/kernel/drv/foo: example# modload -p drv/foo OPTIONS
The following options are supported: -e exec_file Specify the name of a shell script or executable image file that is executed after the module is successfully loaded. The first argument passed is the module ID (in decimal). The other argument is module specific. The module specific information is: the block and character major numbers for drivers, the system call number for system calls, or, for other module types, the index into the appropriate kernel table. See modinfo(1M) -p Use the kernel's internal modpath variable as the search path for the module. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ld(1), add_drv(1M), kernel(1M), modinfo(1M), modunload(1M), system(4), attributes(5), modldrv(9S), modlinkage(9S), modlstrmod(9S), mod- ule_info(9S) Writing Device Drivers NOTES
Use add_drv(1M) to add device drivers, not modload. See Writing Device Drivers for procedures on adding device drivers. SunOS 5.10 1 Dec 1993 modload(1M)
All times are GMT -4. The time now is 06:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy