Search Results

Search: Posts Made By: kristinu
5,005
Posted By kristinu
Ohhh, same thing as before is it. Had forgotten...
Ohhh, same thing as before is it. Had forgotten about that
5,005
Posted By kristinu
Bash Script: Echo continuation across many lines
I am writing a bash script that automatically generates a macro program.
I want to have an echo on multiple lines and getting an error


/home/chaos/instru-correct.sh: line 309: command line is:...
2,995
Posted By kristinu
Bash: Setting default values for variables
I have a variable I want to use in bash script. The user will pass an argument
to the script and I will store it in `arg_fql`. If the user does not pass the variable,
I still never set arg_fql, but...
3,897
Posted By kristinu
Bash Parameter Expansion
I have made the following examples that print various parameter expansions


text: iv-hhz-sac/hpac/hhz.d/iv.hpac..hhz.d.2016.250.070018.sac
(text%.*): ...
3,049
Posted By kristinu
The runtime will be of the format `hh:mm:ss` ...
The runtime will be of the format `hh:mm:ss`

runtm: 05:34:21I would like things to look as follows


[********************* ] 55% 05:34:21


I have tried
...
3,049
Posted By kristinu
Bash Scripting: Adding runtime in a progress bar
I have the following code that generates a progress bar and
want to add the current execution time after the percentage
value. The current execution time is stored in the variable `runtm`

I am...
1,225
Posted By kristinu
It was quite difficult to find the problem with...
It was quite difficult to find the problem with the code though.
1,225
Posted By kristinu
awk and Unary Operators in Bash
I am getting the following error


/home/hagbard/chaos/resip/ictja/siculet-0.0.0/amvib/tmspan.sh: line 135: BEGIN {printf "%.0f", int((tm-(thh*60.0*60.0))/60.0)}: No such file or directory...
3,717
Posted By kristinu
I have now stored the initial and final time as...
I have now stored the initial and final time as 24-hour hours, minutes and seconds in
variables `itm` and `ftm` respictively.

My files look as follows and want to introduce `itm` and `ftm` in...
3,717
Posted By kristinu
Converting seconds to time
I have a list of time spans in seconds, and want to compute the time span
as hh:mm:nn

I am coding in bash and have coded the following. However, the results are
wrong as "%.0f" rounds the...
2,091
Posted By kristinu
Using rename
Renaming files using rename on the following files


rename 's/.99999/.99999.sac.pzs/g' *.99999



sac_pzs_iv_esml_hhz__2013.074.10.18.23.0000_2599.365.23.59.59.99999...
2,291
Posted By kristinu
It is 3 times faster when using `ed`.
It is 3 times faster when using `ed`.
2,291
Posted By kristinu
I want to remove files ending with .001 to...
I want to remove files ending with

.001 to .207
.282 to .356
2,291
Posted By kristinu
Removing station data ptcc, nov
Apologies Don

---------- Post updated at 05:54 PM ---------- Previous update was at 05:43 PM ----------

And I am using GNU Trisquel

This seems to work when I try to remove filenames with...
2,291
Posted By kristinu
Removing lines from a file
I have a file `/tmp/wrk` containing filenames with paths. I want to remove filenames
from this file, for example

remove all filenames containing alja cagr cavt clta cmdo or corl

remove all...
2,017
Posted By kristinu
$fn is the file I want to transfer file...
$fn is the file I want to transfer


file /tmp/wrk
/tmp/wrk: ASCII text

scp /media/hagbard/DS521260/ingv/iv/hpac/hhz.d/iv.hpac..hhz.d.2016.001...
2,017
Posted By kristinu
Copying files to remote server
I am trying to copy code to remote server, doing something like this

However it is copying one file and than the script exits


i=0; j=0
while read fn; do

dir=${fn%/*} # Gets...
3,992
Posted By kristinu
Right, `dirname` and `basename` involve executing...
Right, `dirname` and `basename` involve executing a system program.

---------- Post updated 02-19-18 at 06:51 AM ---------- Previous update was 02-18-18 at 06:57 PM ----------

Have made the...
3,992
Posted By kristinu
Calling the commands
That's correct. I am just doing echo to check the commands created are correct so
when I happy with how things are set up, I can then invoke them properly.

---------- Post updated at 05:12 PM...
3,992
Posted By kristinu
Latest Update
Yes, I had that for test. The latest version is now. Naturally I will remove all the print
values and just keep the progress bar.


nwk="iv"
incl_nm="*hhz*"
# Counts the number of files to...
3,992
Posted By kristinu
Seed Format
You pass it a list of files in seed format (Standard for the Exchange of Earthquake Data)
and outputs a set of files in sac format (a format used by the Seismic Analysis Code SAC).

For example,...
2,322
Posted By kristinu
Progress Bar
I have found a progress bar on github but when I try the following it does not
do anything


source progress_bar.sh
progress_bar 300


GitHub - nachoparker/progress_bar.sh: Progress bar for...
2,322
Posted By kristinu
Displaying percentage when it changes
I want to display the percentage when it changes by 3% and only print
then keeping the cursor on the same line.

Some suggestions would help me.

---------- Post updated at 07:03 AM ----------...
1,701
Posted By kristinu
No problem
Not an assertion, just a clarification. Sometime there might be some option or whatever to delete things. But as you mention it's ok.
1,701
Posted By kristinu
Possible Problems to avoid
Many directories will be created and I want to avoid a situation where
if there is a mistake the user might loose any directories or files.
Showing results 1 to 25 of 500

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