Sponsored Content
Top Forums Shell Programming and Scripting gzcat into awk and then change FILENAME and process new FILENAME Post 302207962 by radoulov on Sunday 22nd of June 2008 05:27:54 AM
Old 06-22-2008
You can use getline to start reading the $ifile whenever you want, but I would prefer something like this: define $ifile as a second argument and then process it as usual: NR == FNR -> action -> next for the first one, action for the second.
FS is not a problem, you can change it anytime you want.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change new filename with date ??

Hi all, I am newbie and hope that you can help me to rename a file If I have a file name Perform.01222006.12345.Log now I would like to backup another file with another name like perform-20060112.dat This is a flat file, and I want to collect some field, then put it in a new file from... (9 Replies)
Discussion started by: sabercats
9 Replies

2. UNIX for Dummies Questions & Answers

Change multiple filename formats with WHILE

Hi All, I'm trying to run a simple shell program to change all the files named *.cvs to *.txt. I am trying to use WHILE and this is what I have so far: This changes the first file from *.cvs to *.txt, but it is not cycling through the other files. My suspicion is that I don't have the... (5 Replies)
Discussion started by: ScKaSx
5 Replies

3. 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

4. Shell Programming and Scripting

Change the filename

I have 100 files in a directory with a.1 a.2 a.3 a.4 How do i remove a. and i need the file names as 1 2 3 4 please help (2 Replies)
Discussion started by: srichunduru
2 Replies

5. Shell Programming and Scripting

filename change with awk needed

Hi, i have files which contains list of csv file names say temp.txt contains below like data Dns_bangalore_08172011.093033.1139.csv Dns_bangalore_08172011.093133.1139.csv now i want to insert some string before .csv in the filename say i want to insert string _sim1 beofre .csv... (3 Replies)
Discussion started by: raghavendra.nsn
3 Replies

6. 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

7. UNIX for Dummies Questions & Answers

How to change date in a filename?

Hi i want to list files based on date and change the date alone in the files in a directory abc20120101.txt xyzxyxz20120101.txt ccc20120201.txt ddd20120301.txt In the above i want to select only files having date 20120101 and rename the date for those files like below abc20111231.txt... (3 Replies)
Discussion started by: Dewdrop
3 Replies

8. Shell Programming and Scripting

Change filename - increment digit by 60

I have a bunch of files, they have spaces! I am working in windows 7, but I am hoping I could install and use cygwin or some other unix platform to rename my files (suggestions welcome). The files are named: Wind Attn Vol - 474.wrl Wind Attn Vol - 475.wrl Wind Attn Vol - 476.wrl etc.. I... (10 Replies)
Discussion started by: d_sai_kumar
10 Replies

9. UNIX for Dummies Questions & Answers

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My Requirement: 1) There are some set of files in a directory like given below OTP_UFSC_20120530000000_acc.csv OTP_UFSC_20120530000000_faf.csv OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

10. Programming

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My code: if then set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\ "pam_account"; for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Discussion started by: aealexanderraj
0 Replies
AUTOCONFIG(8)						      System Manager's Manual						     AUTOCONFIG(8)

NAME
autoconfig - configure the running system to the hardware SYNOPSIS
autoconfig [-i ifile] [-n nfile] [-k kfile] [-v] [-d] [-c] DESCRIPTION
Autoconfig is called by init(8) to configure the currently running system. Init checks the exit status of autoconfig to determine if the configuration was successful. Autoconfig reads the device table /etc/dtab for a list of devices which may be on the system. It first ver- ifies that the kernel has an attach routine for each device (and therefore has a device handler) and that the kernel has a probe routine. It then checks each of these devices to see if it is present, and if it is, attempts to make it interrupt (if possible) to verify that the interrupt vector is correct. The interrupt vector is checked to see that it has not previously been used. An interrupt through any of the device's consecutive vectors is sufficient. Devices which use programmable vectors (MSCP and TMSCP) are permitted to have a value of 0 in the dtab vector field. This special value tells autoconfig to call the kernel's get next available vector routine and assign that to the device. For programmable vector devices if the dtab vector field is non 0 then the value specified in the dtab file is used. In both cases the driver is called at its xxVec() rou- tine with the vector being assigned to the device. If the address and vector are correct, it then attaches the device by passing the address and unit number to the kernel's attach routine and setting up the interrupt vector according to the interrupt handlers and priority listed in the device table. If the unit number is given as a '?' in the device table, it will be assigned the next available unit number if the device exists. If the device is not present or the vector is incorrect, and if the unit number was specified (not a '?'), then the kernel is notified that that unit is not present, preventing accesses to a nonexistent device address. There are only a few flags which are mostly useful for debugging but for completeness, here they are. -i ifile Use ifile instead of /etc/dtab as the device table. -n nfile Use nfile instead of /unix for finding the namelist of the currently running kernel. -k kfile The file kfile should be used instead of /dev/kmem to alter and read kernel memory. -v Verbose output, indicates reason for rejecting any device in the device table. Normally only attached devices are reported. -c Report error messages for devices skipped because of problems with their interrupt vectors. -d Turn on debugging mode. Shows many gory details of autoconfig's internal processing. BUGS
Devices of the same type must be listed with ascending unit numbers or with wildcards. Disks that could be root devices must have their addresses and vectors initialized in the kernel; the kernel uses a root attach entry in the block device switch to allow disk drivers to do any probes necessary before autoconfiguration. Must be run only by init(8). There is a flag set in the kernel that autoconfig has already run, running autoconfig a second time results in the error: "namelist doesn't match running kernel." Autoconfig attempts to open /dev/kmem for write. If the kernel is in securelevel 1 or higher the open of /dev/kmem will fail. FILES
/etc/dtab device table /unix /dev/kmem SEE ALSO
ucall(2), nlist(3), dtab(5) 3rd Berkeley Distribution December 30, 1992 AUTOCONFIG(8)
All times are GMT -4. The time now is 10:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy