10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to list all html files present in a directory tree, the remove the newline and get one string with a space between files
find /home/chrisd/Desktop/seg/geohtml/ -name '*.html' | awk BEGIN{FS=\r} '{print}'
---------- Post updated at 06:47 PM ---------- Previous update was at 06:25 PM... (5 Replies)
Discussion started by: kristinu
5 Replies
2. Shell Programming and Scripting
Hello,
Is it possible to handle data from two different files at once in awk (latest version and platform is Fedora). I found on the net that we cannot nest awk. My requirement is that I have two similar files :
File 1:
Name: abc
Val = 58
Name: cdf
Val = 1;
..................
File... (7 Replies)
Discussion started by: fifteate
7 Replies
3. Shell Programming and Scripting
I have a file like below.
colA^col2^col3^col4^col5
aa^11^aaa^a1a^111^aa*
bb*^22^bbb*^bb2^222^bb
cc^33^ccc*^3cc^333^ccc
dd^44^d*dd*^d4d^444^ddd
ee^55^e*ee^e5e*^555^e*e
NOTE: '^' is the field separator.
I need to get the output as
colA^col2^col3^col4^col5
aa^11^aaa^a1a^111^aa... (5 Replies)
Discussion started by: rinku11
5 Replies
4. Shell Programming and Scripting
Hi,
I have requirement to fetch lines with a particular character in one column
e.g.
2.5M asdsad
3.5M sadsadas
12323M ssdss
i tried following so far
#echo 2.3M asdsad | nawk -F " " '{print substr($1,length($1))}'
M
So far i have tried following
# echo 2.3M asdsad | nawk... (4 Replies)
Discussion started by: mtomar
4 Replies
5. UNIX for Advanced & Expert Users
Hi all,
I have input lines like below
empno,ename,sal,description
----------------------------
311,"jone,abc",2000,manager
301,david,200,"president,ac"
I need to sum the salary of them i.e. 2000+200
anything suggested
Thanks,
Shahnaz.
Use code tags. (5 Replies)
Discussion started by: shahnazurs
5 Replies
6. Shell Programming and Scripting
Hi,
I have an issue that I am trying to resolve using arrays in awk. I have two files, the first one is a dictionary with this format:
FILE 1 (dictionary)
'Abrir' 'Open'
'Aceptar' 'Accept'
Every line has two fields, a word in two languages.
The second file is a simple list of... (3 Replies)
Discussion started by: gmartinez
3 Replies
7. Shell Programming and Scripting
Script is: accept filename as argument(also handle CTRL+C).to check whether th file exist in the current directory,it it then using awk find the employees who are either born in 1990 or drawing a salary greater than 25000.
In my database file 1st field is of id ,2nd field is name,5th field is of... (5 Replies)
Discussion started by: Priyanka Bhati
5 Replies
8. Shell Programming and Scripting
Context:
I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ):
1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed
2 her true love Sho to Tokyo to... (6 Replies)
Discussion started by: Bubnoff
6 Replies
9. Shell Programming and Scripting
Dear Scripting experts,
I have a problem which i cannot get my head around and wondered if anyone can help me. I have two files "file1" and "file2" and i want to replace column one from file 1 with column one with file2.(where file two has many columns). see example.. ive tried to use cut and... (4 Replies)
Discussion started by: Mish_99
4 Replies
10. Shell Programming and Scripting
Hi all,
How do I extract a value without special characters? I need to extract the value of %Used from below and if its greater than 80, need to send a notification.
I am doing this right now..Its giving 17%..Is there a way to extract the value and assign it to a variable in one step?
df |grep... (3 Replies)
Discussion started by: sam_78_nyc
3 Replies