10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wanted to extract the first record of the file which starst with character say "X". And I tried an awk command which works when i try to execute it individually:
awk 'substr($1,1,1)=="X"' inputfile.txt
But when I use the same command in my script for which I am passing the... (2 Replies)
Discussion started by: Ajay Venkatesan
2. Shell Programming and Scripting
Hello, I am trying to get an output from awk and have been unsuccessful so far.
There is an input file which contains certain segments, that needs to be read and append with another data after matching the segment...
Input file is as shown below
ISA*00* *00* *01*781495650... (2 Replies)
Discussion started by: rakeshv
3. Shell Programming and Scripting
TRAIU DSKDL; SLLA ;LAKJA
KJAJA NSAJAN JANAL AJKJA
JAJALA KAKAK JA AKA AKA AJ A A
PPIN TRY1 SANT1 PPIN TRY2 SANT2
PPIN TRY3 SANT3 PPIN TRY4 SANT4
PPIN TRY5 SANT5
AJJA NA ANA ANHDJLD ALJALJA
AJLJAJD LALJAL ALJALJA ALJALJA (4 Replies)
Discussion started by: jaita
4. Shell Programming and Scripting
I have 2 .csv files as below
Can any one help me to add the 2nd and 3rd column of file1 and file2 and write the output into a new file as below
name1,45,65,date1... (9 Replies)
Discussion started by: ajay547
5. Shell Programming and Scripting
I am working on script to search some records in a file based on certain fields and each record is a ASCII fixed size. I was using awk to search based on certain condition. But the length of the record is too much that awk is giving
syntax error near unexpected token `('
Request... (5 Replies)
Discussion started by: ysrikanth
6. Shell Programming and Scripting
I have a file, with format like:
Input File Format: All columns are seperated using |, last column... (8 Replies)
Discussion started by: New to awk
7. Shell Programming and Scripting
I need to pick up data on both sides of "=" sign.
For eg, following is the context that I have.
Can I have the ip address in one variable and machine name in another variable using sed or awk.
... (1 Reply)
Discussion started by: nua7
I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this.
Vishwas (2 Replies)
Discussion started by: loggedout
9. Shell Programming and Scripting
I want to find the number of records in a particular file and store that value in any other variable. I am trying this below command but it is not working and giving me an error "Uninary Operator Expected".
say I have taken a variable name 'count' in which I have to store the no. of... (7 Replies)
Discussion started by: dtidke
10. Shell Programming and Scripting
I have a fixed with file, which have almost 10 records
AR 100 TTT
BC 200 SSS
DA 199 YYY
AR 500 RRR
PO 300 QQQ
PB 800 PPP
PC 150 OOO
AR 111 CCC
AD 321 LLL
I Have to check for first two charactors and if its 'AR' i have to save those records to one... (3 Replies)
Discussion started by: meetavin