10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
data1
1 0.01 3 5
1 0.6 2 1
data2
2 0.02 3 5
2 0.3 2 1
data3
3 0.01 3 5
3 0.01 2 1
output
1 0.01 data1
2 0.02 data2
3 0.01 data3
3 0.01 data3
I want to print 1st, 2nd column and the filename when second column is less than 5. (3 Replies)
Discussion started by: johnkim0806
3 Replies
2. Shell Programming and Scripting
Trying in this forum. Not sure if it is permitted.... but in need of help.
Please find the requirements in the below link.
https://www.unix.com/unix-dummies-questions-answers/191503-add-extra-commas-csv-file-2.html#post302665179
Thanks in Advance. (1 Reply)
Discussion started by: chillblue
1 Replies
3. Shell Programming and Scripting
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies
4. Shell Programming and Scripting
Hi,
Iam working on Sun solaris machine.I have a file with ids in the below format.
1
2
3
4
5
I want it as:
1,2,3,4,5
I use these commands individually to get into that format:
vi file
/1,$s/$/,/g
This adds commas in the file and then i save it.
next i use this command :... (8 Replies)
Discussion started by: jyothi_wipro
8 Replies
5. Shell Programming and Scripting
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Newbie here. I have a file that consists of data that I want to convert to a csv file. For example:
Jul 20 2008 1111 / visit home / BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105
Jul 21 2008 22222 / add friend / BlackBerry8830/4.2.2 Profile/MIDP-2.0... (3 Replies)
Discussion started by: kangaroo
3 Replies
7. Shell Programming and Scripting
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies
8. Shell Programming and Scripting
Hi there, I am checking disk spaced used on a box
# df -k | grep dsk | awk {'print $3'}
2055463
20165785
18310202
32274406
I want to somehow add them up but am no quite sure how to do this in a loop. ...i.e
for n in 'df -k | grep dsk | awk {'print $3}'
do
<some adding... (1 Reply)
Discussion started by: hcclnoodles
1 Replies
9. Programming
I have a file which contains numbers as follows:
1234 9876 6789 5677 3452
9087 4562 1367 2678 7891
I need to remove the empty spaces and add commas between the numbers like:
1234,9876,6789,5677,3452,
9087,4562,1367,2678,7891
Can anyone tell me the command to do... (4 Replies)
Discussion started by: jazz
4 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
I have a file. Each line suppose to contain 188 fields delimited by , (comma --> so 187 commas) but some records have less than 188 fields which needs to be filled by additional commas at the end.
Ex: a file wth 5 columns and 4 commas
test1,test2,test3
red1,red2... (5 Replies)
Discussion started by: jingi1234
5 Replies