Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extracting Filename from Fullpath Post 302114933 by awk on Thursday 19th of April 2007 01:10:40 PM
Old 04-19-2007
see basename or dirname
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extracting only the filename without its extenstion

Hi, I have a requirement that i need to store only the filename without its extension. Can anyone please help me to do this. For Example, i have stored the filename in a varialble called fname. I need to extract all the charecters before the first occurence of the dot. If fname has value... (3 Replies)
Discussion started by: lotus123
3 Replies

2. Shell Programming and Scripting

Listing filesnames in bare format with fullpath

Hi, Need help. How can I get a listing of files in bare format with full path. I mean in the following format. /root/dir1/sub-dir1/file1 /root/dir1/sub-dir1/file2 /root/dir1/sub-dir2/file1 /root/dir1/sub-dir2/file2 /root/dir2/sub-dir1/file1 /root/dir2/sub-dir2/file1... (2 Replies)
Discussion started by: tipsy
2 Replies

3. Shell Programming and Scripting

gzcat into awk and then change FILENAME and process new FILENAME

I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies

4. Shell Programming and Scripting

Extracting the Filename

Hi, I need to extract the file name without filetype. Suppose in DIR1 if i have files like F1.txt and F2.DOC then i need to return F1 and F2 only with out file types (txt and DOC). I tried with the following code newname = ` $i | cut -d "'." -f1` but it is giving the error " 0403-006... (1 Reply)
Discussion started by: Raamc
1 Replies

5. UNIX for Dummies Questions & Answers

extracting date from a filename

Hi, I am a beginner in Unix so please bear with me... I have a directory which has files in format: RECF-YYYY-MM-DD-input. For example, RECF-2008-02-25-input. I need to extract the YYYYY-MM-DD substring from this filename and convert that into date and compare it with a date. How do I do that?... (7 Replies)
Discussion started by: laiko
7 Replies

6. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

7. Shell Programming and Scripting

How to get filename from the fullpath and how to grep multiple strings

Hi, New to shell scripting.... I have log file content as below: I have to count the number of occurences of ERROR or INFO Messages. So, I cut 5 th column and uniquly sorted and redirected it to new.txt file. But I want copy to S*/Filename and T*/Filename of respective ERROR or INFO... (5 Replies)
Discussion started by: Shirisha
5 Replies

8. Shell Programming and Scripting

extracting multiple variables from a filename.

hi all, I'm trying to automate some tasks and while I've got the script itself working, I'm having difficulties with automatic file detection and associated variable setting... for example, in a directory I've got several files... something along the lines of: xis0_NAME_src.file... (2 Replies)
Discussion started by: u5j84
2 Replies

9. Shell Programming and Scripting

Extracting a portion of the filename

Hi I would like to extract the first portion of filename from a list of files. The filename pattern is of the form 123456789_TEXT_TEXT_TEXT_.csv. I want to extract just the numerical portion of this filename from the list of files and then output this into another text file. K (6 Replies)
Discussion started by: kamal_p_99
6 Replies

10. UNIX for Beginners Questions & Answers

Extracting filename

I am using bash and have a filename with a path and extension and want to extract just the filename Have used the following code, oflna gives the file name with extension, but now neet to remove the .texi at the end. oflna=${flnm##*/} oflnb=${${flnm##*/}%.*} echo "flnm: $flnm" echo... (1 Reply)
Discussion started by: Danette
1 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 07:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy