07-28-2010
What have you tried, or read so far?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to create a file which contains the list of all the files present in that directory.
e.g.,
ls /export/home/user/*.dat > list_file.dat
but what i am getting is:
$ ls /export/home/user/*.dat > list_file.dat
/export/home/user/*.dat: No such file or directory
But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies
2. Shell Programming and Scripting
for x in `find /vmfs/volumes/v01tstn01a01/ -type d`; do find $x -name '*.vmx' > /dev/null || echo $x; done;
The goal of this is to find the subdirectories that do NOT contain a file with the extension of .vmx
Any help would be great! (6 Replies)
Discussion started by: hodnov
6 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Ok i need to create a directory within another directory in one command. I'm already in a directory to. I need to... (6 Replies)
Discussion started by: gangsta
6 Replies
4. Shell Programming and Scripting
Hi All,
Please help.
I have got a file which contains a listing of a file and some directories after it, one by one. I am calling this file xyz.txt here
file1
dir1
dir2
dir3
dir4
file2
dir5
dir6
dir7
dir8
file3
dir9
dir10
dir11
dir12 (6 Replies)
Discussion started by: Piyush Jakra
6 Replies
5. Shell Programming and Scripting
Hi,
I have a directory which I am passing in my script as a parameter. Parameter name has been set to $TCH_FILE_DIRECTORY.
I want to know if there's atleast 1 (or more) files in this directory with the extension '.tch'. How can I find this using ksh. (4 Replies)
Discussion started by: Bhavesh Sharma
4 Replies
6. Shell Programming and Scripting
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies
7. Shell Programming and Scripting
Excuses for the long descriptive title.
I am working with Sindhi and developing a database of all verbal conjugations in that language.
I have generated 2 files:
Verbs.dic contains all the verbs, one verb per line
Inflections.dic contains the verbal conjugations which need to be appended to... (6 Replies)
Discussion started by: gimley
6 Replies
8. UNIX for Beginners Questions & Answers
Hi,
I have an inquiry on how do I use the find command in Solaris Unix to find some file ends with extension : txt, err in the root directory with modified date of 30days and this find command will also need to exclude b directory and its subdirectory. All the files from the above find criteria... (5 Replies)
Discussion started by: snowfrost88
5 Replies
9. Shell Programming and Scripting
In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies
10. Programming
Experts,
Need your help for this. Please support
My motive is to create seperate output file for each Input Files(File 1 and File2) in another folder say(/tmp/finaloutput)
Input files
File 1(1.1.1.1.csv)
a,b,c
43,17104773,3
45,17104234,4
File 2(2.2.2.2.csv)
a,b,c
43,17104773,1... (2 Replies)
Discussion started by: as7951
2 Replies
read(n) Tcl Built-In Commands read(n)
__________________________________________________________________________________________________________________________________________________
NAME
read - Read from a channel
SYNOPSIS
read ?-nonewline? channelId
read channelId numChars
_________________________________________________________________
DESCRIPTION
In the first form, the read command reads all of the data from channelId up to the end of the file. If the -nonewline switch is specified
then the last character of the file is discarded if it is a newline. In the second form, the extra argument specifies how many characters |
to read. Exactly that many characters will be read and returned, unless there are fewer than numChars left in the file; in this case all |
the remaining characters are returned. If the channel is configured to use a multi-byte encoding, then the number of characters read may |
not be the same as the number of bytes read. |
If channelId is in nonblocking mode, the command may not read as many characters as requested: once all available input has been read, the |
command will return the data that is available rather than blocking for more input. If the channel is configured to use a multi-byte |
encoding, then there may actually be some bytes remaining in the internal buffers that do not form a complete character. These bytes will |
not be returned until a complete character is available or end-of-file is reached. The -nonewline switch is ignored if the command returns
before reaching the end of the file.
Read translates end-of-line sequences in the input into newline characters according to the -translation option for the channel. See the
fconfigure manual entry for a discussion on ways in which fconfigure will alter input.
SEE ALSO
file(n), eof(n), fblocked(n), fconfigure(n)
KEYWORDS
blocking, channel, end of line, end of file, nonblocking, read, translation, encoding
Tcl 8.1 read(n)