10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have to split a file containing 100 lines to 5 files say from lines ,1-20 ,21-30 ,31-40 ,51-60 ,61-100
Here is i can do it for 2 file but how to handle it for more than 2 files
awk 'NR < 21{ print >> "a"; next } {print >> "b" }' $input_file
Please advidse.
Thanks (4 Replies)
Discussion started by: abhaydas
4 Replies
2. Shell Programming and Scripting
i would like to insert a line from 2.txt into 1.txt between " and "
or a way of adding to the end of each line " _01_ and have the numbers
correspond to the line #
1.txt=
foofoo "" _01_
foofoo "" _02_
foofoo "" _03_
foofoo "" _04_
2.txt= ... (6 Replies)
Discussion started by: klein
6 Replies
3. Shell Programming and Scripting
Hi
I have problem with replace line in txt file , I have this string:
144185 DISK
Piece qqr8ot6l_1_1
--
144186 DISK
Piece ukr8pf2e_1_1
--
144187 DISK
Piece ter8p9gc_1_1
--
144188 DISK
Piece 4er8qb84_1_1
and (8 Replies)
Discussion started by: primo102
8 Replies
4. Shell Programming and Scripting
I want to add/append the info in the following format to my.txt file.
20130702|abcd20130702.txt FN|SN|DOB
I tried the below script but it throws me some exceptions.
<#!/bin/sh
dt = date '+%y%m%d'members;
echo $dt+|+members+$dt;
/usr/bin/awk -f
BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies
5. Shell Programming and Scripting
So I have a python program that I run, which runs accordingly to options I have listed in a text file (ie user_prefs). Now there are many options listed in this user_prefs.txt, but the one of most interest to me is that of the file path of the time series.
I have over a hundred of these time... (8 Replies)
Discussion started by: Jimmyd24
8 Replies
6. Shell Programming and Scripting
In a txt file called, eso.txt, I have:
......
3 where process_status_flag = 70 and LISTENER_ID in (930.00, 931.00, 932.00, 933.00, 934.00)
4 group by LISTENER_ID
5 order by LISTENER_ID;
LISTENER COUNT
----------... (3 Replies)
Discussion started by: Daniel Gate
3 Replies
7. Shell Programming and Scripting
I have a large 3479 line .csv file, the content of which looks likes this:
1;0;177;170;Guadeloupe;x
2;127;171;179;Antigua and Barbuda;x
3;170;144;2;Umpqua;x
4;170;126;162;Coos Bay;x
...
1205;46;2;244;Unmak Island;x
1206;47;2;248;Yunaska Island;x
1207;0;2;240;north sea;x... (5 Replies)
Discussion started by: kalelovil
5 Replies
8. Programming
Hi,
I have a .txt file which contains the x, y and z co-ordinates of particles which I am trying to cast for a particular compound. The no. of particles present is of the order of 2 billion and hence the size of the text file is of the order of a few Gigabytes. The particles have been casted layer... (5 Replies)
Discussion started by: mugga
5 Replies
9. Shell Programming and Scripting
i'm a beginner in shell and i have a txt file that is updating every second or msec so i need a program to read the last line of this txt file
is this possible to do? (5 Replies)
Discussion started by: _-_shadow_-_
5 Replies
10. UNIX for Dummies Questions & Answers
I need to read the last file for a particular day, such as, "Jun 13" because the CSV file is cumulative for the entire day, so I don't want all the previous files, I just want the last file, for that day.
I ran an 'ls -al | grep "June 13" > myLs.txt' (simplified) to list all files from that day.... (2 Replies)
Discussion started by: yongho
2 Replies