10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to put together an script that will output the most frequent string in a column. This is what I have:
awk '{count++} END {for ( i in count ) print i, count }'
Of course, my script is outputting all different strings and counts. However, I just need the most frequent one (there... (7 Replies)
Discussion started by: Xterra
7 Replies
2. Shell Programming and Scripting
I have a list of URLs and I want to be able to count the number of instances of addresses ending in a certain TLD and output and sort it like so.
5 bdcc.com
48 zrtzr.com
49 rvo.com
Input is as so
ync.org
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu... (1 Reply)
Discussion started by: Pjstaab
1 Replies
3. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
4. Shell Programming and Scripting
Okay -- I hope I ask this correctly.
I'm working on my little shell script to write vendor names and aliases to files from user input. If a user choose to add to a file, he can do that as well. I'm using a select loop for this function to list all the possible files the user can choose from.... (7 Replies)
Discussion started by: Straitsfan
7 Replies
5. Shell Programming and Scripting
Hi ,
I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;"
... (4 Replies)
Discussion started by: Vaddadi
4 Replies
6. Shell Programming and Scripting
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies
7. Programming
Hi
I have written a simple client/server(socket programming) application using TCP/IP. My server code runs on Linux and client is on windows. The concept is that the client request for files(on demand basis) to the server and the server sends it back to the client. As the client is attached to... (3 Replies)
Discussion started by: akilan
3 Replies
8. Shell Programming and Scripting
Hi,
I am new to this world of shell programming. I am facing a problem that is :
I have directory which has many sub directories at different depth. say
A/B/C/files
A/B/files
A/B/C/D/files
In this directory structure there exists a file called ".project" in some of the sub... (2 Replies)
Discussion started by: bhaskar_m
2 Replies
9. Shell Programming and Scripting
Hi,
I have a set of files stored in a single directory that I use to set parameters for a physics code, and I would like to streamline the process of updating them all when I change a parameter. For instance, if the files are called A2000p300ini, A2000p300sub, A2000p300run, and the text in each... (3 Replies)
Discussion started by: BlueChris
3 Replies
10. Shell Programming and Scripting
Hello all
Im performing find + grep operation that looks like this :
find . -name "*.dsp" | xargs grep -on Project.lib | grep -v ':0'
and I like to add to this one liner the possibility to replace the string " Project.lib" that found ( more then once in file ) with "Example.lib"
how can I do... (0 Replies)
Discussion started by: umen
0 Replies