10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The script must ask the user to enter the user name and check whether the user exists in /etc/passwd (you must allow the partial usernames also). If the username exists, display the details as:
List of users
Login Name:
User ID:
... (3 Replies)
Discussion started by: nobletechnology
3 Replies
2. 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
3. Shell Programming and Scripting
Hi,
I am writing a code where the file is a pipe delimited and I would need to extract the 2nd part of field2 if it is "ATTN", "C/O" or "%" and check to see if field9 is populated or not. If field9 is already populated then leave it as is but if field9 is not populated then take the 2nd part of... (3 Replies)
Discussion started by: msalam65
3 Replies
4. Shell Programming and Scripting
Hi,
I have data in following format.
10001, John, Daves, Architecture, -2219
10002, Jim, Cirners, Businessman, -2219
1003, Tom, Katch, Engineer, -14003
I want to select the last column of the above given file and paste it on a different file in the following manner.
File TEST column... (11 Replies)
Discussion started by: kam786sim
11 Replies
5. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies
6. Shell Programming and Scripting
Hi:
I've been searching the net but didnt find a clue. I have a file in which, for some records, some fields coincide. I want to compare one (or more) of the dissimilar fields and retain the one record that fulfills a certain condition. For example, on this file:
99 TR 1991 5 06 ... (1 Reply)
Discussion started by: rleal
1 Replies
7. UNIX for Dummies Questions & Answers
Hello all,
Would appreciate if someone can help me out on the following requirement.
INPUT FILE:
--------------------------
TPS REPORT
abc def ghi
jkl mon pqr
stu vrs lll
END OF TPS REPORT
TPS REPORT
field1 field2 field3
field4 field5 field6 (8 Replies)
Discussion started by: hyennah
8 Replies
8. Shell Programming and Scripting
Greetings,
I would like to extract records from a fixed width text file that have unique field elements.
Data is structured like this:
John A Smith NY
Mary C Jones WA
Adam J Clark PA
Mary Jones WA
Fieldname / start-end position
Firstname 1-10... (8 Replies)
Discussion started by: sitney
8 Replies
9. Shell Programming and Scripting
I'm trying to compare the first column values in two different files that use a numerical value as the key and output the more meaningful value found in the second column of file1 in front of the matching line(s) in file2. My problem is that file2 has multiple records. For example given:
FILE1... (4 Replies)
Discussion started by: RacerX
4 Replies
10. Shell Programming and Scripting
I am trying to cut the first 10 characters from a file only if the file has 'xyz' in field 185-188.
I tried this
cat filename | cut -c1-10
but this gives me all the records regardless of what is in field 185-188.
Is this doable ?
Thanks in advance for responses. (2 Replies)
Discussion started by: jxh461
2 Replies