Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: LMHmedchem
4,515
Posted By LMHmedchem
I was just trying to confirm that /home was...
I was just trying to confirm that /home was actually mounted at the partition/directory I specified in fstab. I have more than one copy of /home and I wanted to make sure that the version I was...
4,515
Posted By LMHmedchem
I have tried the following where dpi.txt is a...
I have tried the following where dpi.txt is a file in /home/user_name
$ pwd
/home/user_name

realpath dpi.txt
realpath -L dpi.txt
realpath -P dpi.txt
All of these result in...
4,515
Posted By LMHmedchem
Shell command to print full path to current home directory
Hello,

This is a bit of an odd question. Most commends like echo $HOME will just print /home/user_name . I have a system where /home is mounted in a directory that is not under / and is...
8,466
Posted By LMHmedchem
This is probably just a copying error by me. I...
This is probably just a copying error by me. I also fixed the error noted by Scrutinizer. I added the || because some comments are two characters.

I have attached a .zip with test files. The...
8,466
Posted By LMHmedchem
I will put together a sample directory and post...
I will put together a sample directory and post it.

The -v method works for the comments and replace line, no matter if there are special characters or spaces. It is the $look_for line that is the...
8,466
Posted By LMHmedchem
awk call in bash function called with arugments not working, something lost in translation?
Hello,

I have this awk code in a bash script to perform a find and replace task. This finds one unique line in a file and substitutes the found line with a replacement.
#! /bin/bash

# value...
Forum: Programming 01-29-2020
4,556
Posted By LMHmedchem
So I wasn't expanding the components variables of...
So I wasn't expanding the components variables of TESTDIR correctly? I guess I should have at least noticed the TESTDIR was not being assigned using the same operator as BDIR.

I have tried now to...
Forum: Programming 01-29-2020
4,556
Posted By LMHmedchem
Thanks for the suggestion, I did fix this error...
Thanks for the suggestion, I did fix this error but it did not resolve the issue.

I decided to move the assignment of archdir to after the definitions of ${BDIR} and ${TESTDIR}.

Now the revised...
Forum: Programming 01-29-2020
4,556
Posted By LMHmedchem
Makefile instructions to create directories (CentOS7 , GNU Make 3.82)
Hello,

My makefiles are set up to generate an environment specific build directory based on the local configuration and some values passed to make. It generally looks like,

# compilers, may be...
3,341
Posted By LMHmedchem
I went with this method inserted into a script....
I went with this method inserted into a script. It worked well (and very quickly) the first time I tried it, but there was no output the second time. I will have to investigate what I did there.

I...
3,341
Posted By LMHmedchem
Script to process a list of items and uncomment lines with that item in a second file
Hello,

I have a src code file where I need to uncomment many lines.

The lines I need to uncomment look like,

C CALL l_r(DESNAME,DESOUT, 'Gmax', ESH(10), NO_APP, JJ)
The comment is...
4,118
Posted By LMHmedchem
Thanks for this, it makes the code much more...
Thanks for this, it makes the code much more usable since I can call it in a function instead of having to hard code the find line for each instance.

The number of shared memory pages could...
4,118
Posted By LMHmedchem
Script using awk to find and replace a line, how to ignore comment lines
Hello,

I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src...
1,030
Posted By LMHmedchem
I temporarily removed the spaces from both the...
I temporarily removed the spaces from both the test input files and the shell code to eliminate the space as a possible source of problems. I try to avoid having spaces within a single field of a...
1,030
Posted By LMHmedchem
Thank you for the reply but I don't see in the...
Thank you for the reply but I don't see in the above how my stats will be found in the huge stats output file when there is no notation of how to find what I am looking for. The stats I need are the...
1,030
Posted By LMHmedchem
Dozens of these files are generated and I need to...
Dozens of these files are generated and I need to pull out some of the statistics and put them into a form where I can look at all of the results in one file.

There will probably be a header row...
1,030
Posted By LMHmedchem
Pass an array to awk to sequentially look for a list of items in a file
Hello,

I need to collect some statistical results from a series of files that are being generated by other software. The files are tab delimited. There are 4 different sets of statistics in each...
1,090
Posted By LMHmedchem
These scripts have always been run by double...
These scripts have always been run by double clicking on a launcher, shortcut, or alias. Command line arguments like sudo -i scriptname can generally be executed from a launcher or shortcut, but I...
1,090
Posted By LMHmedchem
This is mostly an exercise in ways to run a...
This is mostly an exercise in ways to run a script with root privileges without a user needing to open a terminal, navigate to a directory, and either call the script with sudo or su root from...
1,090
Posted By LMHmedchem
Thank you for taking the time to put together...
Thank you for taking the time to put together this informative post. I'm sure that others will read it as well.


Some of my issue was how to go about running from the admin account. The account I...
1,090
Posted By LMHmedchem
Issue with shutdown command in script (MacOS High Sierra)
Hello,

I have a backup script that runs an rsync backup to an external drive. I use the script frequently on Windows and Linux and have installed it on a Mac. The script has an option to run ...
580
Posted By LMHmedchem
for echo $0, ${0%/*} I get, ...
for echo $0, ${0%/*} I get,
/Volumes/external_backup/00_i7-8600k_z370_backup/rsync_log/archive_logs_and_clear, /Volumes/external_backup/00_i7-8600k_z370_backup/rsync_log

I also tried echo...
580
Posted By LMHmedchem
Issue with pwd for script run by double click on script (MacOS High SIerra)
Hello,

I have the following script that just archives and clears some log files.

#!/bin/bash

# script: archive_logs_and_clear
# add date to logfile names and copy archive directory
#...
1,085
Posted By LMHmedchem
When I remove the extension, the file icon...
When I remove the extension, the file icon changes from the Atom text editor icon to the terminal icon. The script does work as expected now. I wonder if MacOS reads the first line of a file that...
1,085
Posted By LMHmedchem
Here is the output, My-iMac:rsync_backup...
Here is the output,
My-iMac:rsync_backup my_user$ ls -l
total 392
-rwxrwxrwx@ 1 my_user staff 88056 Mar 5 20:22 data_backup_icon.png
-rwxrwxrwx@ 1 my_user staff 102078 Mar 5 20:24...
Showing results 1 to 25 of 331

 

Featured Tech Videos

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