Sponsored Content
Operating Systems Solaris list files .txt and .TXT in one command Post 302272594 by thepurple on Wednesday 31st of December 2008 04:50:13 AM
Old 12-31-2008
Quote:
Originally Posted by matrixmadhan
Code:
for file_name in *.[tTxXtT]*
do
echo "$file_name"
done

ls is not needed here
well now how i will put the $file_name in my script--
Code:
for file in `ls *.[tTxXtT]*`; do
        mv $file /tmp/$file

please note that in my file i have *.txt.log. i must omit the .txt.log files. Only takes that ended with .txt or .TXT
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

echo "ABC" > file1.txt file2.txt file3.txt

Hi Guru's, I need to create 3 files with the contents "ABC" using single command. Iam using: echo "ABC" > file1.txt file2.txt file3.txt the above command is not working. pls help me... With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies

2. UNIX for Dummies Questions & Answers

counting a list of string in a list of txt files

Hi there! I have 150 txt files named chunk1, chunk2, ........., chunk150. I have a second file called string.txt with more than 1000 unique strings, house, dog, cat ... I want to know which command I should use to count how many times each string appears in the 150 files. I have tried... (4 Replies)
Discussion started by: Pep Puigvert
4 Replies

3. Shell Programming and Scripting

command to list .txt and .TXT file

Hi expersts, in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log I want list only .txt and .TXT files in one command... how to ?? //purple (1 Reply)
Discussion started by: thepurple
1 Replies

4. UNIX for Dummies Questions & Answers

List all files except *.txt in a directory

I have many types of files (Eg: *.log, *.rpt, *.txt, *.dat) in a directory. I want to display all file types except *.txt. What is the command to display all files except "*.txt" (9 Replies)
Discussion started by: apsprabhu
9 Replies

5. Solaris

list of files in a txt file from sftp location

I want equivalent of ftp in sftp for listing of files into local machine from sftp location. ftp>ls -l list.txt the above creates a file list.txt in the local machine's current directory. sftp>ls -l list.txt it is giving Couldn't stat remote file: No such file or directory is there... (1 Reply)
Discussion started by: megh
1 Replies

6. UNIX for Dummies Questions & Answers

rusty with cp command -- how to cp all .doc files with .txt extension

I'm rusty with cp, so I was wondering: is it possible to cp all the .doc files in a folder and make them .txt files? Can you use cp to do that? (3 Replies)
Discussion started by: Straitsfan
3 Replies

7. UNIX for Dummies Questions & Answers

find lines in file1.txt not found in file2.txt memory problem

I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory) diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//' Is there a better more efficient way to find the lines in one file... (5 Replies)
Discussion started by: raptor25
5 Replies

8. Shell Programming and Scripting

Script to list files not present in audio.txt file

I am having following folder structure. /root/audios/pop /root/audios/jazz /root/audios/rock Inside those pop, jazz, rock folders there are following files, p1.ul, p2.ul, p3.ul, j1.ul, j2.ul, j3.ul, r1.ul, r2.ul, r3.ul And I have a file named as "audio.txt" in the path /root/audios,... (11 Replies)
Discussion started by: gopikrish81
11 Replies

9. Shell Programming and Scripting

Compare two txt files,mismatches will be in new txt files

Hi, Below are the sample data for txt files. txt file 1 Partnumber|catgroup_id 10001082|46016 10001093|4680 10001093|386003 10001093|463004 10003251|683 10003251|63005 10003252|463005 10003252|4683 10003260|463005 10003260|4683 10003264|4683 10003264|463005 13420000|67... (5 Replies)
Discussion started by: Ankita Talukdar
5 Replies

10. Shell Programming and Scripting

How to get a variables from two different txt files and need to run a command using that values?

Hi Q1. I have a scenario to run cfsend command,this command will run based on node name,port num,userid and password I was created one file called test.txt and inserted two values,then called those two values from test.txt file that pointed to node place and ran the script it worked fine Now... (10 Replies)
Discussion started by: venuvaka
10 Replies
MY_PRINT_DEFAULTS(1)					       MySQL Database System					      MY_PRINT_DEFAULTS(1)

NAME
my_print_defaults - display options from option files SYNOPSIS
my_print_defaults [options] option_group ... DESCRIPTION
my_print_defaults displays the options that are present in option groups of option files. The output indicates what options will be used by programs that read the specified option groups. For example, the mysqlcheck program reads the [mysqlcheck] and [client] option groups. To see what options are present in those groups in the standard option files, invoke my_print_defaults like this: shell> my_print_defaults mysqlcheck client --user=myusername --password=secret --host=localhost The output consists of options, one per line, in the form that they would be specified on the command line. my_print_defaults supports the following options. o --help, -? Display a help message and exit. o --config-file=file_name, --defaults-file=file_name, -c file_name Read only the given option file. o --debug=debug_options, -# debug_options Write a debugging log. A typical debug_options string is 'd:t:o,file_name'. The default is 'd:t:o,/tmp/my_print_defaults.trace'. o --defaults-extra-file=file_name, --extra-file=file_name, -e file_name Read this option file after the global option file but (on Unix) before the user option file. o --defaults-group-suffix=suffix, -g suffix In addition to the groups named on the command line, read groups that have the given suffix. o --no-defaults, -n Return an empty string. o --verbose, -v Verbose mode. Print more information about what the program does. o --version, -V Display version information and exit. COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/). MySQL 5.1 04/06/2010 MY_PRINT_DEFAULTS(1)
All times are GMT -4. The time now is 03:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy