Search Results

Search: Posts Made By: millsy5
2,347
Posted By millsy5
${parameter:offset:length} That's exactly...
${parameter:offset:length}

That's exactly what I wanted but had no idea where to look.
2,347
Posted By millsy5
Thanks for the reply it worked perfectly. ...
Thanks for the reply it worked perfectly.

However I don't fully understand it.
If the string is any 2 digits do nothing. That part is ok.
The next part, if the string is a number and any...
2,347
Posted By millsy5
Remove char if not a number
I need to write a BASH script that takes a 2 character string and removes the second character if it is not a digit e.g.

If the string is numberical value >9 e.g. string1 = '34' then leave...
1,841
Posted By millsy5
Thanks Guru. That works. Just wondering why using...
Thanks Guru. That works. Just wondering why using the exe that was generated using the C compiler doesn't work (as opposed to using the Unix compiled one).
1,841
Posted By millsy5
Running C program in UNIX
I want to run a C program from my BASH script. Here's some very basic simplified code of my bash script:


#!/bin/bash

echo "Run C program"
./main.c
echo "Ran C program"


Here's my...
1,344
Posted By millsy5
Thanks. That worked a charm :) How do I...
Thanks. That worked a charm :)

How do I remove the G from the 10G i.e. only display the 10?
1,344
Posted By millsy5
Extracting information using awk
I want to write a script that extracts a value from a line of text. I know it can be done using awk but I've never used awk before so I don't know how to do it. The text is:

Mem: 100M Active,...
1,078
Posted By millsy5
Cpuset usage
I want to assign different processers to execute each of my files. My system uses FreeBSD. There is a command called taskset which works on Linux but not FreeBSD.

I came across another command...
7,963
Posted By millsy5
PERL: Running script from Notepad++
I'm not sure if this forum covers PERL issues but here I go:

I'm trying to run a PERL script from Notepadd++. I've entered the path of the script from the run command but it is only opening a...
11,099
Posted By millsy5
where exactly do i enter this? when i select...
where exactly do i enter this? when i select 'run' in notepad++ i can set the directory but how do i select the file? the login part does not open it.
11,099
Posted By millsy5
run cygwin bash script from notepad++
I'm using Notepad++ to edit my BASH scripts and using CYGWIN to run them from Windows7.

In Notepad++ there is a 'Run' capability. How do I get this to run my scripts directly without having to...
2,207
Posted By millsy5
ah i understand now. when i copied the code i had...
ah i understand now. when i copied the code i had left out the input file.
2,207
Posted By millsy5
So is the purpose of the while loop to just keep...
So is the purpose of the while loop to just keep reading each line within the while loop until something causes it to come out or stop e.g. an exit statement

---------- Post updated at 05:21 PM...
2,207
Posted By millsy5
Thanks for replying but I need to understand my...
Thanks for replying but I need to understand my code as it is. My code does work (I know because it's used in work) but I don't understand how it works and can't get it to work.
2,207
Posted By millsy5
read command with bash
I'm trying to understand the following piece of code using bash:


while read myline; do
.
.
.
done


My initial interpretation was that the user is prompted to enter data which...
6,206
Posted By millsy5
vi and vim are causing the same problems.
vi and vim are causing the same problems.
6,206
Posted By millsy5
I'm using notepad++. Thanks I find though...
I'm using notepad++. Thanks

I find though that every time I edit the script I have to run the dos2unix again. Is there any way to permanently keep it converted to Unix format?
6,206
Posted By millsy5
Thanks for that. It's working perfectly now :)
Thanks for that. It's working perfectly now :)
6,206
Posted By millsy5
Thanks for that. How do I configure it to not...
Thanks for that. How do I configure it to not write \r?
6,206
Posted By millsy5
Cygwin errors
I'm not sure if this is the right place to post this or should I even be posting this here but here is my problem. I've recently installed Cygwin on my windows laptop so that I can run shell scripts....
1,378
Posted By millsy5
Yes it is. I just googled the syntax for the case...
Yes it is. I just googled the syntax for the case statement and I can see that the double semicolon is part of it. Thanks
1,378
Posted By millsy5
2 semicolons
Just wondering what 2 semicolons together after a command means
1,265
Posted By millsy5
Thanks again
Thanks again
1,265
Posted By millsy5
Thanks Scrutinizer, that worked perfectly. Do you...
Thanks Scrutinizer, that worked perfectly. Do you mind explaining how it works please.
1,265
Posted By millsy5
duplicating a line
I have a text file which is the results of running a tests hundreds of times. For simplicity let's say that each test consists of 5 lines of text numbered 1-5 e.g.

1 aaa aaa aaa

2 bbb bbb bbb...
Showing results 1 to 25 of 44

 
All times are GMT -4. The time now is 05:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy