I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
I am facing one problem, can any one please suggest me the command for the same in unix. I am using Ksh.
I have a large file with the data that looks like below.
"ROTO2-2007f","_US01","9/15/2007","9/21/2007",346492,"NICK, LCD WATCH"97,1,"NAPOLITJ ","BERGER,M Z & CO INC",0.01,
... (2 Replies)
Hi All,
I want to edit a file using shell script..For ex...a file called /etc/passwd..here I am searching for "ftp" if it is there just change it to "tftp" without using any temporary file. (3 Replies)
I have some files created in Excel that have to be saved as .txt files in order to load them into our accounting system. I can save the files as .txt files through Excel, but I then have to open them in TextPad and do a save as to change the Format from PC to UNIX. Is there a way to skip this step... (2 Replies)
Hi Frnds...
I have an input file name.txt and another file named as source.. name.txt is having only one column and source is having around 25 columns...i need to read from name.txt line by line and search it in source file and then save the result in results file..
I have a rough idea about the... (15 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Hi friends,
I am pretty new to shell scripting, please help me in this Scenario.
for example, If I have one file called input.txt
once I run the script,
1.It has to delete the old input.txt and create the new input.txt (if old input.txt is not there, no offence, just it has to create a... (2 Replies)
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
wget -x -i link.txt
The above downloads and create unique entries for the 97 links in the text file. However, each new file is saved as CM080 with a FILE extention. Is there a way to convert each file in that directory to a .txt? The 97 files are in... (12 Replies)
Discussion started by: cmccabe
12 Replies
LEARN ABOUT CENTOS
atr_analysis
ATR_ANALYSIS(1p) User Commands ATR_ANALYSIS(1p)NAME
ATR_analysis - analyse a smart card ATR
SYNOPSIS
ATR_analysis [ATRstring]
DESCRIPTION
ATR_analysis is used to parse the ATR (Answer To Reset) sent by a smart card.
The command also tries to find the card model using an ATR database stored in a text file smartcard_list.txt.
The smartcard_list.txt file is searched in ./, /usr/local/pcsc/ and /usr/share/pcsc/ directories.
Exemple:
$ ATR_analysis '3B A7 00 40 18 80 65 A2 08 01 01 52'
ATR: 3B A7 00 40 18 80 65 A2 08 01 01 52
+ TS = 3B --> Direct Convention
+ T0 = A7, Y(1): 1010, K: 7 (historical bytes)
TB(1) = 00 --> Programming Param P: 0, I: 0
TD(1) = 40 --> Y(i+1) = 0100, Protocol T = 0
-----
TC(2) = 18 --> Work waiting time: 960 x 24 x (Fi/F)
+ Historical bytes: 80 65 A2 08 01 01 52
Possibly identified card:
3B A7 00 40 18 80 65 A2 08 01 01 52
Gemplus GPK8000
BUGS
Maybe many bugs since I am not a ISO 7816 expert.
FILES
smartcard_list.txt
SEE ALSO pcscd(8), pcsc_scan(1)AUTHOR
Ludovic Rousseau <ludovic.rousseau@free.fr>
Version: 1.3 October 2005 ATR_ANALYSIS(1p)