10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to use grep to find files that have newlines in the filename. For example, I have a directory where I create three files:
$ touch file1
$ touch "file 2"
$ touch "file
> with
> newlines"
$ find
.
./file 2
./file1
./file?with?newlinesI now want to pipe the find output into grep and... (4 Replies)
Discussion started by: Ralph
4 Replies
2. Shell Programming and Scripting
Hi All,
I have this code which has two problems:
find . -name '*.fil' | xargs while read page
do
cat $page | awk '{for(i=1;i<=NF;i++) print $i}' $page>$page.txt
done
find . -name '*.fil.txt' | xargs rename '.fil.txt' .fil
1. I am running this code in a directory consisting of large... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
3. Shell Programming and Scripting
Hi all,
Sorry if someone has answered something like this already, but I have a problem. I am not brilliant with "awk" but think it should be the command to use to get what I am after.
I have 2 files:
job-file (several hundred lines like):
1018003,LONG MU WAN,1113S
1018004,LONG MU... (4 Replies)
Discussion started by: sgb2301
4 Replies
4. Shell Programming and Scripting
Hi all,
assume that i am having two files file.1 and file.2
these are the contents of file.1
these are the contents of file.2
i want these two contents to be written in another single file like this.
can you please post your suggestions.
Thanks in advance,
... (3 Replies)
Discussion started by: anishkumarv
3 Replies
5. Shell Programming and Scripting
Hi,
I have 2 files that I got as an output from another program. They are :
File 1
((((((CtBJa:197.0,CtBTz:197.0):85.0,CtAHr:197.0):116.0,CtDUw:197.0):176.0,CtSwe:197.0):110.0,
(CtL2b:197.0,Ct4Bu:197.0):196.0):197.0,CmuNg:197.0);... (5 Replies)
Discussion started by: Lucky Ali
5 Replies
6. Shell Programming and Scripting
Hi experts
i have a simple script that fetches the count from different servers and inserts ahead of server name like below
servera,1
serverb,25
serverc,35
what i want to do is now when i run this script next day i want that output to be next to the earlier one like below and if possible... (5 Replies)
Discussion started by: raj2989
5 Replies
7. Shell Programming and Scripting
Hi all,
I have two files -- one with 1024 lines and another with 2048 lines. I want to merge them to create another file in such way that it takes 2 lines from file with 1024 lines and 4 from 2048 lines.
I wrote a sample script and curious to see if there is a better way; i am sure there is,... (4 Replies)
Discussion started by: jakSun8
4 Replies
8. HP-UX
I have 2 files, 1.txt and 2.txt which have the following format:
1.txt
:451:1
:451:0
:451:1
and so on..
2.txt
:108:13897187
:108:90890789
:108:76476386
and so on..
I want to combine the files horizontally, I tried paste 1.txt 2.txt as well as cat but both of them are giving me... (3 Replies)
Discussion started by: anshuljain
3 Replies
9. Shell Programming and Scripting
Hi,
I have the following problem:
Input:
"num1","num2","num3",num4,num5,"num6"
required output:
"num1num2","num3",num4,num5,"num6"
I need to join field 1 and field 2 together but I always end up getting:
"num1""num2","num3",num4,num5,"num6"
Note that not all fields have " at both... (8 Replies)
Discussion started by: ReV
8 Replies
10. UNIX for Advanced & Expert Users
I am trying to merge two large file horizontally using paste command. Every thing is working fine except for time. Its taking lot of time.
Is there any effiecient way of doing the same thing or is there anyway by which I can improve its perfomance programatically?
Thanks,
Yeheya (1 Reply)
Discussion started by: yeheyaansari
1 Replies