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
Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2 Replies
3. Shell Programming and Scripting
Dear all,
I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script.
Any help is greatly appreciated.
Greetings,
emily
DATA.txt (snippet of the huge text file)
407202849... (2 Replies)
Discussion started by: emily
2 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. UNIX for Dummies Questions & Answers
Dear all,
I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000)
thanks a lot!
Lin (2 Replies)
Discussion started by: forevertl
2 Replies
6. Shell Programming and Scripting
i am having a problem finding the lowest number after punching in a bunch of numbers in the .txt file but its probably the way i have the code set up.
help please! (4 Replies)
Discussion started by: tinsteer
4 Replies
7. Shell Programming and Scripting
This is appending a column.
My question is fairly simple. I have a program generating data in a form like so:
1 20
2 22
3 23
4 12
5 43
For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies
8. Shell Programming and Scripting
Can you help me please?
I know that
wc -l *.txt gives you the number of lines in each file. But how can i count the files that have over n lines? (4 Replies)
Discussion started by: dark_knight
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes..
i wanna attach a text file and send to a mail id..used the following code :
uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com
it works... (2 Replies)
Discussion started by: ash22
2 Replies
10. AIX
Hi,
We have an application running on AIX5.3 that generates text files that are sent to be printed using the lp command.
The user can specify the number of copies they want printed, but only one copy ever gets printed.
I've checked the lp command that is used, and it correctly specifies... (5 Replies)
Discussion started by: stebradshaw
5 Replies