Sponsored Content
Top Forums Shell Programming and Scripting command to list .txt and .TXT file Post 302272629 by thepurple on Wednesday 31st of December 2008 08:24:56 AM
Old 12-31-2008
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
 

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

Binary txt file received when i use uuencode to send txt file as attachment

Hi, I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes.. i wanna attach a text file and send to a mail id..used the following code : uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com it works... (2 Replies)
Discussion started by: ash22
2 Replies

3. Shell Programming and Scripting

AWK CSV to TXT format, TXT file not in a correct column format

HI guys, I have created a script to read 1 column in a csv file and then place it in text file. However, when i checked out the text file, it is not in a column format... Example: CSV file contains name,age aa,11 bb,22 cc,33 After using awk to get first column TXT file... (1 Reply)
Discussion started by: mdap
1 Replies

4. Solaris

list files .txt and .TXT in one command

Dear experts, In a directory i have both *.TXT and *.txt files. I have a script- for file in `ls *.txt`; do mv $file /tmp/$file How to list both *.txt and*.TXT file in one command so that script will move both .txt or .TXT whatever it find. br//purple (4 Replies)
Discussion started by: thepurple
4 Replies

5. Shell Programming and Scripting

awk append fileA.txt to growing file B.txt

This is appending a column. My question is fairly simple. I have a program generating data in a form like so: 1 20 2 22 3 23 4 12 5 43 For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies

6. Shell Programming and Scripting

Need to append the date | abcddate.txt to the first line of my txt file

I want to add/append the info in the following format to my.txt file. 20130702|abcd20130702.txt FN|SN|DOB I tried the below script but it throws me some exceptions. <#!/bin/sh dt = date '+%y%m%d'members; echo $dt+|+members+$dt; /usr/bin/awk -f BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies

7. Windows & DOS: Issues & Discussions

2 Questions: replace text in txt file, add text to end of txt file

so... Lets assume I have a text file. The text file contains multiple "#" symbols. I want to replace all thos "#"s with a STRING using DOS/Batch I want to add a certain TEXT to the end of each line. How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies

8. Shell Programming and Scripting

Desired output.txt for reading txt file using awk?

Dear all, I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script. Any help is greatly appreciated. Greetings, emily DATA.txt (snippet of the huge text file) 407202849... (2 Replies)
Discussion started by: emily
2 Replies

9. UNIX for Dummies Questions & Answers

Split Every Line In Txt Into Separate Txt File, Named Same As The Line

Hi All Is there a way to export every line into new txt file where by the title of each txt output are same as the line ? I have this txt files containing names: Kandra Vanhooser Rhona Menefee Reynaldo Hutt Houston Rafferty Charmaine Lord Albertine Poucher Juana Maes Mitch Lobel... (2 Replies)
Discussion started by: Nexeu
2 Replies

10. Programming

[Python] replicating "sha256 -C checksum_file.txt file.txt"

Hello everyone, Since my python knowledge is limimted, I've challenged myself to learn as much as possible to help me with my carrere. I'm currently trying to convert a shell script to python, just to give myself a task. There is one section of the script that I'm having issues converting and... (2 Replies)
Discussion started by: da1
2 Replies
IPSEC_SHOWHOSTKEY(8)						  [FIXME: manual]					      IPSEC_SHOWHOSTKEY(8)

NAME
ipsec_showhostkey - show host's authentication key SYNOPSIS
ipsec showhostkey [--ipseckey [gateway]] [--left] [--right] [--dump] [--verbose] [--version] [--list] [--x509self] [--x509req] [--x509cert] [--txt gateway] [--dhclient] [--file secretfile] [--keynum count] [--id identity] DESCRIPTION
Showhostkey outputs (on standard output) a public key suitable for this host, in the format specified, using the host key information stored in /etc/ipsec.secrets. In general only the super-user can run this command, since only he can read ipsec.secrets. The --txt option causes the output to be in opportunistic-encryption DNS TXT record format, with the specified gateway value. If information about how the key was generated is available, that is provided as a DNS-file comment. For example, --txt 10.11.12.13 might give (with the key data trimmed for clarity): ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 IN TXT "X-IPsec-Server(10)=10.11.12.13 AQOF8tZ2...+buFuFn/" No name is supplied in the TXT record because there are too many possibilities, depending on how it will be used. If the text string is longer than 255 bytes, it is split up into multiple strings (matching the restrictions of the DNS TXT binary format). If any split is needed, the first split will be at the start of the key: this increases the chances that later hand editing will work. The --version option causes the version of the binary to be emitted, and nothing else. The --verbose may be present one or more times. Each occurance increases the verbosity level. The --left and --right options cause the output to be in ipsec.conf(5) format, as a leftrsasigkey or rightrsasigkey parameter respectively. Again, generation information is included if available. For example, --left might give (with the key data trimmed down for clarity): # RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 leftrsasigkey=0sAQOF8tZ2...+buFuFn/ The --dhclient option cause the output to be suitable for inclusion in dhclient.conf(5) as part of configuring WAVEsec. See <http://www.wavesec.org>. If --ipseckey is specified, the output format is the text form of a DNS IPSECKEY record (see RFC4025); the host name is the one included in the key information (or, if that is not available, the output of hostname --fqdn), with a . appended. The gateway information, if provided, is is included, otherwise, the gateway is assumed to be self, and to be of type FQDN. Generation information is included if available. For example (with the key data trimmed down for clarity): ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 xy.example.com. IN IPSECKEYKEY floyd albert ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 xy.example.com. IN KEY 0x4200 4 1 AQOF8tZ2...+buFuFn/ Normally, the default key for this host (the one with no host identities specified for it) is the one extracted. The --id option overrides this, causing extraction of the key labeled with the specified identity, if any. The specified identity must exactly match the identity in the file; in particular, the comparison is case-sensitive. There may also be multiple keys with the same identity. All keys are numbered based upon their linear sequence in the file (including all include directives) The --file option overrides the default for where the key information should be found, and takes it from the specified secretfile. DIAGNOSTICS
A complaint about "no pubkey line found" indicates that the host has a key but it was generated with an old version of FreeS/WAN and does not contain the information that showhostkey needs. FILES
/etc/ipsec.secrets SEE ALSO
ipsec.secrets(5), ipsec.conf(5), ipsec_rsasigkey(8) HISTORY
Written for the Linux FreeS/WAN project <http://www.freeswan.org> by Henry Spencer. BUGS
Arguably, rather than just reporting the no-IN-KEY-line-found problem, showhostkey should be smart enough to run the existing key through rsasigkey with the --oldkey option, to generate a suitable output line. The need to specify the gateway address (etc.) for --txt is annoying, but there is no good way to determine it automatically. There should be a way to specify the priority value for TXT records; currently it is hardwired to 10. The --id option assumes that the identity appears on the same line as the : RSA { that begins the key proper. [FIXME: source] 10/06/2010 IPSEC_SHOWHOSTKEY(8)
All times are GMT -4. The time now is 03:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy