10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file full of coordinates of the form:
37.68899917602539 58.07500076293945 57.79100036621094
The numbers don't always have the same number of decimal points. I need to reduce the decimal points of all the numbers (there are 128 rows of 3 numbers) to 2.
I have tried to do this... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies
2. Shell Programming and Scripting
Hi,
I do have couple of files in a folder. The names of each of the files have a pattern.
ahet_005678.txt
ahet_005898.txt
ahet_007678.txt
ahet_004778.txt
...
...
ahet_002378.txt
Each of the above files have the same pattern of data with 4 columns and have an header for the last 3... (4 Replies)
Discussion started by: Kanja
4 Replies
3. UNIX for Dummies Questions & Answers
I have the following input:
xxxx-2.7.19_WR3
I have extract the following:
2.7.19
Can anyone suggest an awk or sed command to do the above...:confused:
another condition is
if the input is :
xxx-xxx_xxx-1.4-1_WR3.0bg.armv6jel_vfp
it shud still extract : 1.4-1
whenever "-"... (12 Replies)
Discussion started by: xerox
12 Replies
4. Shell Programming and Scripting
Hi,
My script ask for the input of two numbers in the middle of it.
I would like to know how to indicate this two numbers when I submit the script.
thanks for any help,
jalves (4 Replies)
Discussion started by: jalves
4 Replies
5. UNIX for Dummies Questions & Answers
I have a text file, data.txt, which looks like :-
head1 head2 head3
data1 1 data 1 2 data 1 3
data 2 1 data 2 2 data 2 3
data 3 1 data 3 2 data 3 3
etc etc
I would like to print this file, using the lp -d command,
with a heading line, as follows :-
Report for whatever department as... (2 Replies)
Discussion started by: malts18
2 Replies
6. Shell Programming and Scripting
Hi,
I have a series of BASH shell scripts that run together. I would like it so that these scripts construct a log file as they run. This log file would ideally be a text file that contains exactly (including blank lines) what is output to the terminal.
What is the best way to accomplish... (3 Replies)
Discussion started by: msb65
3 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have a command that I need to supply a negative number as a parameter; how do I do this? I have tried giving it with double quotes, "", but no avail.
Thanks,
Gussi (3 Replies)
Discussion started by: Gussifinknottle
3 Replies
8. Shell Programming and Scripting
Hi,
How would I get rid of lines having something else than numbers (such as tabs,white space, special characters, empty line, letters).
So I have big file with numers as follows:
12345678901
23456789012
32343678901
42345638901
52345678901
and I sometimes the file might contain some... (2 Replies)
Discussion started by: Juha
2 Replies
9. Shell Programming and Scripting
I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some characters the script echoes some error message and goes to the next command. Below is a snippet of the... (1 Reply)
Discussion started by: pvar
1 Replies
10. Shell Programming and Scripting
Is there any way to makesure that the input from the user is all numbers?
thankz (5 Replies)
Discussion started by: XXXXXXXXXX
5 Replies