Sponsored Content
Full Discussion: taking a part from file name
Top Forums Shell Programming and Scripting taking a part from file name Post 302252315 by ghostdog74 on Wednesday 29th of October 2008 09:07:39 AM
Old 10-29-2008
Code:
# file="CT_Thread_Trace.384.20080728-121217.log"
# file=${file#*.}
# echo ${file%%.*}
384

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

taking snapshot of a file

Hi I would like to take snapshots or look at a file every few secs that its not being edited or not being made any changes. After a minute, if there were no changes, then I would like to call my application job. Looking for command that does this. No success in googling it. the test... (1 Reply)
Discussion started by: bryan
1 Replies

2. Shell Programming and Scripting

taking a part of string from a given path

Hi I have two path as follows system/console/bin/code/sample/testfile.txt system/console/bin/database/files/new/dbfile.txt I need the output as code/sample in first case database/files/new in second case That is I am omitting system/console/bin and the filename(s) in both... (2 Replies)
Discussion started by: ssuresh1999
2 Replies

3. Shell Programming and Scripting

How to ftp multiple files by taking the file name from a input file.

Hi, I'm working on a script which has to copy multiple files from one server to another server. The list of files that are to be copied is present in a file say input.txt. vi input.txt abc.c welcome.c new.c welcome1.c for ftp'ing a single file say 'new.c' the following code... (2 Replies)
Discussion started by: i.srini89
2 Replies

4. Shell Programming and Scripting

[Solved] Printing a part of the last line of the specific part of a file

Hi, I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this: Name =A xxxxxx yyyyyy zzzzzz aaaaaa bbbbbb Value = 57 This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies

5. Shell Programming and Scripting

Installing a bin file by taking input from a properties file

I need to install a bin file in UNIX which requires user interaction for giving some information like user id , path, sid etc. All these information is stored in a properties file in the same location. So if i give ./file.bin -f propfile.properties will it install the file taking all the... (1 Reply)
Discussion started by: coolmohere
1 Replies

6. Shell Programming and Scripting

Taking part of one file name and putting it into a another file name

Not sure how to do the following, but any help would be appreciated. Has to be done using C shell (sorry about that). I have about 300 files that I need this done for, but I am only going to give one example. I will just need to know how to execute your solution through some type of loop to... (2 Replies)
Discussion started by: jclanc8
2 Replies

7. UNIX for Dummies Questions & Answers

Taking word count from file and printing in file

hi, i am having a file which contains the below content, i need to take the word count of if and print the file name also inputfile.txt file_name1.txt,type_name1.txt file_name2.txt,type_name2.txt i would need the word count of the files like this if file_name*.txt then wc -l... (10 Replies)
Discussion started by: rohit_shinez
10 Replies

8. Shell Programming and Scripting

Search pattern in a file taking input from another file

Hi, Below is my requirement File1: svasjsdhvassdvasdhhgvasddhvasdhasdjhvasdjsahvasdjvdasjdvvsadjhv vdjvsdjasvdasdjbasdjbasdjhasbdasjhdbjheasbdasjdsajhbjasbjasbhddjb svfsdhgvfdshgvfsdhfvsdadhfvsajhvasjdhvsajhdvsadjvhasjhdvjhsadjahs File2: sdh hgv I need a command such that... (8 Replies)
Discussion started by: imrandec85
8 Replies

9. Shell Programming and Scripting

Taking out part of a string by matching a pattern

Hi All, My Problem is like below. I have a file which contains just one row and contains data like PO_CREATE12457888888888889SK1234567878744551111111111SK89456321145789955455555SK8888888815788852222 i want to extract SK12345678 SK89456321 SK88888888 So basically SK and next 8... (4 Replies)
Discussion started by: Asfakul Islam
4 Replies

10. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
chvol(8)						      System Manager's Manual							  chvol(8)

NAME
chvol - changes the attributes of a volume SYNOPSIS
/sbin/chvol [-l] [-r blocks] [-w blocks] [-t blocks] [-c on | off] [-A] special domain OPTIONS
Activates a volume after an incomplete addvol or rmvol operation. Turns I/O consolidation mode on or off. Displays the range of I/O transfer sizes, in 512-byte blocks, as calculated by the kernel, based on the disk's geometry: rblks displays the minimum, the maximum, and the preferred transfer size for reads. wblks displays the minimum, the maximum, and the preferred transfer size for writes. Specifies the maximum number of 512-byte blocks that the file system reads from the disk at one time. Specifies the maximum number of dirty, 512-byte blocks that the file system will cache in-memory (per volume in a domain). Dirty means that the data has been written by the application but the file system has cached it in memory so it has not yet been written to disk. The number of blocks must be in multiples of 16. The valid range is 0-32768. The default (when a volume is added to a domain) is 16,384 blocks. For optimal performance, specify blocks in multiples of wblks (as specified by the -w option) and multiples of rblks (as specified by the -r option). Specifies the maximum number of 512-byte blocks that the file system writes to the disk at one time. OPERANDS
Specifies the block special device name, such as /dev/disk/dsk2c. Specifies the name of the file domain. DESCRIPTION
The chvol command enables you to change the attributes of a volume in an active domain. For example, the file system can consolidate a number of I/O transfers into a single, large I/O transfer. The larger the I/O transfer, the better the file-system performance. If you attempt to change the attributes of a volume in a domain that is not active, an error message is produced. The initial I/O transfer parameter for both reads and writes is typically 128 or 256 blocks, depending on the disk driver's preferred I/O transfer rate. Once you change the I/O transfer parameters with the -r option or the -w option, the parameters remain fixed until you change them again. The values for the I/O transfer parameters are limited by the device driver. Every device has a minimum and maximum value for the size of the reads and writes it can handle. If you set a value that is outside of the range that the device driver allows, the device automatically resets the value to the largest or smallest it can handle. By default, the I/O consolidation mode (cmode) is on. The cmode must be on for the I/O transfer parameters to take effect. You can use the -c option to turn the cmode off, which sets the I/O transfer parameter to one page. Interrupting an rmvol operation can leave the volume in an inaccessible state. If a volume does not allow new allocations after an rmvol operation, use the chvol command with the -A option to reactivate the volume. Using the chvol command without any options displays the current cmode and the I/O transfer parameters. RESTRICTIONS
The values for the wblks and rblks attributes are limited by the device driver. You must be the root user to use this command. EXAMPLES
The following example displays the cmode and the I/O transfer parameters of the /dev/disk/dsk1c volume in the domain1 file domain: # chvol /dev/disk/dsk1c domain1 rblks = 128 wblks = 128 cmode = on thresh = 16,384 The following example additionally toggles the cmode: # chvol -c off /dev/disk/dsk1c domain1 # chvol /dev/disk/dsk1c domain1 rblks = 128 wblks = 128 cmode = off thresh = 16,384 The following example continues by changing the I/O transfer parameters of reads (rblks) and writes (wblks) from 128 blocks to 256 blocks. Note that the cmode is off and must be on before the parameters take effect: # chvol -r 256 -w 256 -c on /dev/disk/dsk1c domain1 chvol /dev/disk/dsk1c domain1 rblks = 256 wblks = 256 cmode = on thresh = 16,384 The following example shows the I/O transfer range on domain1: # chvol -l /dev/disk/dsk0a domain1 chvol /dev/disk/dsk0a domain1 rblks: min = 16 max = 32768 pref = 256 wblks: min = 16 max = 32768 pref = 256 SEE ALSO
advfs(4), showfdmn(8) chvol(8)
All times are GMT -4. The time now is 11:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy