10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a folder with several files of which I want to eliminate all of the terms that they have in common using `awk`.
Here is the script that I have been using:
awk '
FNR==1 {
if (seen++) {
firstPass = 0
outfile = FILENAME "_new"
... (4 Replies)
Discussion started by: owwow14
4 Replies
2. Shell Programming and Scripting
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies
3. Shell Programming and Scripting
Hi,
Example File:
(jumped,
bumped,
)
how to
jumped,
FROM tree;
EXIT
I have some hundreads of files like this with the different words and I want to remove the comma before the bracket and also I have to remove the comma before FROM word.
I am trying to use this command :
awk '... (5 Replies)
Discussion started by: rajshashi
5 Replies
4. Shell Programming and Scripting
I have a txt file as database. when i run my program what it does is it ask me for 3 name and stored in the file as
name1:name2:name3:1
when u enter 3 name it add those in file as above format and add 1 at the end. I what i want is if i enter same names again it changes that 1 to 2 and so... (3 Replies)
Discussion started by: Learnerabc
3 Replies
5. Shell Programming and Scripting
Hi
I have awk script that is reading data from file and printing the result on the monitor....I need to read more than one file .....one by one... and store the result in output file...
---------- Post updated at 06:41 AM ---------- Previous update was at 06:39 AM ----------
please i need... (4 Replies)
Discussion started by: aldreho
4 Replies
6. Shell Programming and Scripting
Hi,
I have a data as follow:
1 400
2 239
3 871
4 219
5 543
6 ...
7 ...
.. ...
.. ...
99 818
100 991
I want to replace the sequence number (column 1) that start from 150. The output should like this:
150 400
151 239 (3 Replies)
Discussion started by: nica
3 Replies
7. Shell Programming and Scripting
Hi,
How can i able to do a similar operation to "find" number of files in a folder in an awk?
In bash, we could do easily using "find" command. But currently, I am having an awk block and i wanted to extract these information.
Please advise. Thanks. (2 Replies)
Discussion started by: ahjiefreak
2 Replies
8. Shell Programming and Scripting
Example:
O o x
What I would like to do is to rename the first column of the above file without affecting the format. The output should look like the following:
Output:
O o x
#! /bin/ksh
cd $HOME/lib/.Lee
#nl = no. of lines.
nl=`grep 'X' ex | wc -l`
#ln = line no.
ln=1 (17 Replies)
Discussion started by: ilak1008
17 Replies
9. Shell Programming and Scripting
awk script to find the number of files in a directory with their date less than 15-oct-2006
please help (4 Replies)
Discussion started by: uni_ajay_r
4 Replies
10. UNIX for Dummies Questions & Answers
hi,
i am using Sun Solaris 8 (Sparc). Currently there is a SNMP agent running on port 161.
How should I change it to port 8001?
which file to modify and restart is necessary?
pls teach me the information.
thanks (8 Replies)
Discussion started by: champion
8 Replies