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
ascompose(3x)						   AfterStep X11 window manager 					     ascompose(3x)

NAME
ascompose - provides access to libAfterImage functionality, using scripts written in custom XML dialect libAfterImage/ascompose NAMEascompose is a tool to compose image(s) and display/save it based on supplied XML input file. SYNOPSIS
ascompose -f file|-s string [-o file] [-t type] [-V] ascompose -i include_file [-i more_include_file ... ] -f file|-s string [-o file] [-t type] [-V] ascompose -f file|-s string [-o file] [-t type] [-V] [-n] ascompose -f file|-s string [-o file] [-t type [-c compression_level]] [-V] [-r] ascompose [-h] ascompose [-v] DESCRIPTION
ascompose reads supplied XML data, and manipulates image accordingly. It could transform images from files of any supported file format, draw gradients, render antialiased texturized text, perform superimposition of arbitrary number of images, and save images into files of any of supported output file formats. At any point, the result of any operation could be assigned a name, and later on referenced under this name. At any point during the script processing, result of any operation could be saved into a file of any supported file types. Internal image format is 32bit ARGB with 8bit per channel. Last image referenced, will be displayed in X window, unless -n option is specified. If -r option is specified, then this image will be displayed in root window of X display, effectively setting a background for a desktop. If -o option is specified, this image will also be saved into the file or requested type. ascompose can be compiled to not reference X Window System, thus allowing it to be used on web servers and any other place. It does not even require X libraries in that case. Supported file types for input are : XPM - via internal code, or libXpm library. JPEG - via libJpeg library. PNG - via libPNG library. XCF - via internal code. For now XCF support is not complete as it does not merge layers. PPM/PNM - via internal code. BMP, ICO, CUR - via internal code. GIF - via libungif library. TIFF - via libtiff library (including alpha channel support). see libAfterImage/ASImageFileTypes for more. Supported file types for output : XPM - via internal code, or libXpm library. JPEG - via libJpeg library. PNG - via libPNG library. GIF - via libungif library. TIFF - via libtiff library (including alpha channel support). OPTIONS
-h --help display help and exit. -f --file file an XML file to use as input. -s --string string an XML string to use as input. -n --no-display don't display the last referenced image. -r --root-window draw last referenced image image on root window. -o --output file output last referenced image in to a file. You should use -t to specify what file type to use. Filenames are meaningless when it comes to determining what file type to use. -t --type type type of file to output to. -c --compress level compression level. -v --version display version and exit. -V --verbose increase verbosity. To increase verbosity level use several of these, like: ascompose -V -V -V. -D --debug maximum verbosity - show everything and debug messages. -i --include file include file as input prior to processing main file. PORTABILITY
ascompose could be used both with and without X window system. It has been tested on most UNIX flavors on both 32 and 64 bit architecture. It has also been tested under CYGWIN environment on Windows 95/NT/2000 USES
libAfterImage all the image manipulation routines. libAfterBase Optionally. Misc data handling such as hash tables and console io. Must be used when compiled without X Window support. libJPEG JPEG image format support. libPNG PNG image format support. libungif GIF image format support. libTIFF TIFF image format support. AUTHOR
Ethan Fisher <allanon at crystaltokyo dot com> Sasha Vasko <sasha at aftercode dot net> Eric Kowalski <eric at beancrock dot net> libAfterImage/ascompose/sample EXAMPLE
Here is the default script that gets executed by ascompose, if no parameters are given : SOURCE
#if 1 static char* default_doc_str = " <composite op=hue> <composite op=add> <scale width=512 height=proportional> <img id=rose src=rose512.jpg/></scale> <tile width=512 height=384><img src=back.xpm/></tile> </composite> <tile width=512 height=384><img src=fore.xpm/></tile> </composite> <printf format="original image width=%d " var="rose.width"/> <printf format="original image height=%d " var="rose.height"/> <printf format= "original image size in pixels=%d " val=$rose.width*$rose.height/>"; #else static char* default_doc_str = " <composite op=add> <scale width=512 height=proportional> <img id=rose src=rose512.jpg/></scale> <tile width=512 height=384><img src=back.xpm/></tile> </composite>"; #endif 3rd Berkeley Distribution AfterStep v.2.2.11 ascompose(3x)
All times are GMT -4. The time now is 10:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy