Sponsored Content
Full Discussion: wild char * in if
Top Forums UNIX for Dummies Questions & Answers wild char * in if Post 302313601 by nidhink on Wednesday 6th of May 2009 06:00:56 AM
Old 05-06-2009
wild char * in if

if [ -s filename.* ]; then => is it correct?

i need to check 10 files size and do the same action. The file name is same but extension of the files are different. how do i deal with it? Please help
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using if with wild card patterns

Hi, Please help me. Suppose I have a file which contains files like: My file :/tmp/rooh_20020518.lst it consists: ASI00320225041925URD01 ASI00320225041925KER02 ASI00390228095244KER08 ... (1 Reply)
Discussion started by: rooh
1 Replies

2. Programming

files and wild character

Hai, Can any one give idea how to display files by wildcharacter in c. If there is any function available it will very usefull for me. (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

3. Shell Programming and Scripting

How to replace any char with newline char.

Hi, How to replace any character in a file with a newline character using sed .. Ex: To replace ',' with newline Input: abcd,efgh,ijkl,mnop Output: abcd efgh ijkl mnop Thnx in advance. Regards, Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies

4. Programming

Adding a single char to a char pointer.

Hello, I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it: char* getext(char *file) { char *extension; int i, j;... (5 Replies)
Discussion started by: pallak7
5 Replies

5. Solaris

Consoles gone wild!

I have a Sunfire V890 running solaris 10 that has a weird console problem. In the XWindows environment, everything seems to work fine. However, if I go to command-line mode in multi-user mode or otherwise, my prompt scrolls accross the screen so incontrollably, that the only thing you can do is... (5 Replies)
Discussion started by: josephgreensr
5 Replies

6. Programming

concat const char * with char *

hello everybody! i have aproblem! i dont know how to concatenate const char* with char const char *buffer; char *b; sprintf(b,"result.txt"); strcat(buffer,b); thanx in advance (4 Replies)
Discussion started by: nicos
4 Replies

7. Programming

error: invalid conversion from ‘const char*’ to ‘char*’

Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially): xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’: xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’ The same error with all c++ constructors - gcc 4.4.4. If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies

8. Programming

Invalid conversion from char* to char

Pointers are seeming to get the best of me and I get that error in my program. Here is the code #include <stdio.h> #include <stdlib.h> #include <string.h> #define REPORTHEADING1 " Employee Pay Hours Gross Tax Net\n" #define REPORTHEADING2 " Name ... (1 Reply)
Discussion started by: Plum
1 Replies

9. UNIX for Beginners Questions & Answers

Wild char getting expanded in echo

Hi All, I am having a issue in a script. I am trying to execute a select * from a scirpt to a database and printing the the sql string. The * in the sqltring is printing all the files in the directory. How to handle it ? .. .. sql="select * from emp" execute ($sql) echo $sql Here my... (6 Replies)
Discussion started by: arunkumar_mca
6 Replies
HEXBIN(1)						      General Commands Manual							 HEXBIN(1)

NAME
hexbin - Macintosh file de-binhexer SYNOPSIS
hexbin [ - options ] [ files ] DESCRIPTION
hexbin takes the text files specified in files (or standard input if none is specified) and converts them subject to the options specified. OPTIONS
In the absence of any options, hexbin takes the specified files and silently converts them into MacBinary format, giving the output files ".bin" extensions and placing them in the current working directory. -3 Write files in fork format (.info, .data and .rsrc files.) -f As -3, but empty data and rsrc files are not created. -r Write resource forks only (.rsrc files.) -d Write data forks only (.data files.) -u As -d, but the codes for CR and LF are interchanged, the filename extension is .text. -U As -u, but there is no filename extension. -a Write files in AppleShare format. This option is only valid if the program is compiled with support for some form of AppleShare. The current directory must be a valid AppleShare folder. -s Write extracted files to standard output in MacBinary format. -l List every file extracted (and every directory/folder created etc.) -v Like -l, but more verbose. When this option is specified all lines skipped because they do not belong to the hexified format are listed (implies -l.) -i Do not convert, give information only (implies -l.) -c Do not check whether the hexified lines have equal size. Normally the hexifiers gives text files with equal length line size, hexbin uses this in its heuristics to determine whether a line must be skipped. There are however hexified files that do not con- form to that pattern. If this option is specified hexbin will in general be unable to detect whether a line is garbage or not, so you have to remove the garbage by hand. -n name Gives the Unix base file name for the converted files. For files hexified with BinHex 4.0 or compatible hexifiers this flag is not needed; hexbin will determine the Unix file name based on the Mac file name. For files in dl, hex or hcx format this parameter may be needed as these formats do not include the Mac filename. Normally hexbin will in those cases base the Unix file name on the text file name, but that can be overruled with this parameter. -V Gives the patchlevel of the program, and other information. Other options are ignored and the program quits immediately. -H Give short information about the options. Other options are ignored and the program quits immediately. BUGS
As this is a beta release, there may still be some problems. SEE ALSO
macutil(1) AUTHOR
Dik T. Winter, CWI, Amsterdam, The Netherlands (dik@cwi.nl) Parts of the code are based on codes from: ahm (?), Darin Adler, Jim Budler, Dave Johnson, Dan LaLiberte, Jeff Meyer, Guido van Rossum. 3rd Berkeley Distribution October 22, 1992 HEXBIN(1)
All times are GMT -4. The time now is 07:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy