10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
2. Shell Programming and Scripting
The contents of my service file srvtemplate-data-i4-s1.conf is
Description=test service for users
After=network.target local-fs.target
Type=forking
RemainAfterExit=no
PIDFile=/data/i4/srvt.pid
LimitCORE=infinity
EnvironmentFile=%I
.
.
.
WantedBy=multi-user.target (0 Replies)
Discussion started by: rupeshkp728
0 Replies
3. Shell Programming and Scripting
Hi I am new to shell programming in unix
Please if I can provide help.
I have a file structure of a header record and "N" detail records.
The header record will be the total number of detail records
I need to split the file in 2:
One for the header
Another for all detail records
Could... (1 Reply)
Discussion started by: jamcogar
1 Replies
4. Shell Programming and Scripting
I have a fixed width file. The records looks something similar to below:
Type ID SSN NAME .....AND SOME MORE FIELDS
A1 1234 .....
A1 1234 .....
B1 1234 .....
M2 4567 .....
M2 4567 .....
N2 4567 .....
N2 4567 .....
A1 9999
N2 9999
Now if A1 is present then B1 has to be present.... (2 Replies)
Discussion started by: Saanvi1
2 Replies
5. Shell Programming and Scripting
I have 2 files
"File 1" is delimited by ";" and "File 2" is delimited by "|".
File 1 below (3 record shown):
Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones
Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull
Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Discussion started by: vestport
2 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone.
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
ID: 20
Name: X
Age: 19
ID: 21
Name: Z
ID: 22
Email: xxx@yahoo.com
Name: Y
Age: 19
I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies
7. UNIX for Dummies Questions & Answers
file_in_1:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
21 22 23 24
25 26 27 28
29 30 31 32
file_in_2:
9 10 11 12
21 22 23 24
1 2 3 4
17 18 19 20
file_out: (5 Replies)
Discussion started by: kenneth.mcbride
5 Replies
8. Shell Programming and Scripting
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies
9. UNIX for Dummies Questions & Answers
Gentle Unix users,
Can someone tell me how I can use a combination of the cat and grep command to display records that are in FileA but missing in FileB.
cat FileA one line at a time and grep to see if it is in fileB. If it is ignore.
If line is not in fileB display the line.
Thanks in... (4 Replies)
Discussion started by: jxh461
4 Replies
10. UNIX for Dummies Questions & Answers
I had to delete rows when a record was missing a field. My solution was
cut -c 202-402 ${dataFile} | awk '{if (substr($0,103,30) !~ /^ *$/) print $0} >> ${workFile}
The cut is because they came two records to a row.
Anyone want to offer a more elegant solution? (2 Replies)
Discussion started by: gillbates
2 Replies