10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
For shell script. If I had two separate files, file.txt and file1.txt and each has just a list of names from the who command. How would I create an if loop to compare each name? (1 Reply)
Discussion started by: Eric7giants
1 Replies
2. Shell Programming and Scripting
OS : RHEL 6.7
Shell : bash
I have a text file with 5.97 million lines.
I want to split this big file into 12 different files (in sequential order) so that each file will contain roughly 500K lines. I tried the following awk command after googling. But, it just created 2 files... (5 Replies)
Discussion started by: omega3
5 Replies
3. Shell Programming and Scripting
Hey guys.
I have been trying to figure out an easy way to seperate a liste of 150k numbers (10 digits) in a .txt file into odd and even numbers with each of their own files, for a project at work.
I've tried Excel, but it was too much for it and it wasnt very simple. So i gave up after... (13 Replies)
Discussion started by: TranceC
13 Replies
4. UNIX for Dummies Questions & Answers
Hi,
My first post!!
I have a files with header, something like this
Header_Row
AMC|D1|D2|D2
AAO|D3|D4|D5
AMC|D6|D7|D8
AAO|D9|D10|D11
.
.
.
.
.
and millions fo records thereafter like this.
I want to read the above file in a loop and write the lines having AMC into another... (1 Reply)
Discussion started by: amitbakre
1 Replies
5. Shell Programming and Scripting
Hello,
Here is another one. The file type is almost same, many lines and many fields. What I need to do is to extract each line of old file and make it a new file, and in the new file, the field1 will be file name and the rest of field will be transpose to line.
Say,
1, field1 field2 ... (8 Replies)
Discussion started by: ssshen
8 Replies
6. Shell Programming and Scripting
Hi,
I have a string as
str="route net,-hopcount,1,255.255.255.0,10.230.20.111,10.230.20.234 Route True route net,-hopcount,0,-netmask,255.255.248.0,0,10.230.23.254 Route True"
I need to split this string into two lines as
route net,-hopcount,1,255.255.255.0,10.230.20.111,10.230.20.234... (4 Replies)
Discussion started by: chaitanyapn
4 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I am comparing files with for mismatches using fgrep but I've run into a problem.
fgrep -vf $file1 $file2 > mismatches.dat
file1 and file2 both contain file names on each line
file1 has filenames which are up to 92 characters long and contain the "$" char.
example file name:... (2 Replies)
Discussion started by: orahi001
2 Replies
8. Shell Programming and Scripting
i WANT TO SPLIT A FILE WHICH HAS 250 COLUMNS. and the delimiter is '|'. So , can somebody help me with the command i have to use to split the file into two files.
thanks (7 Replies)
Discussion started by: dummy_needhelp
7 Replies
9. Shell Programming and Scripting
My goal is to send multiple files to a person based on their input. The files have similar names like:
file1-egress-filter
file2-ingress-filter
stuff1-egress-filter
stuff2-ingress-filter
...
The script is run with the filename given as arguments, such as: ./mail.sh file stuff
would... (6 Replies)
Discussion started by: earnstaf
6 Replies
10. UNIX for Dummies Questions & Answers
Dear friends:
I have a datafile contains 1 to 40 lines or i can be varied between 1 to 40. I want to split the datafile into smaller files:
if the datafile has 40 lines or more,
file1 contains line 1 to 12
file2 contains line 13 to 25
file3 contains line 26 to 28
file4 contains line 29... (4 Replies)
Discussion started by: bobo
4 Replies