Search Results

Search: Posts Made By: baanprog
2,387
Posted By rbatte1
Yes, I have seen that you were editing your post...
Yes, I have seen that you were editing your post as I was writing mine. Oh well :rolleyes:

So, if you want to exclude all blank lines, comments (actually starting with a #) and those starting...
2,387
Posted By RudiC
Would this come close to what you want to...
Would this come close to what you want to achieve:while IFS="=" read A B
do case $A in
"#"*) printf "comment" ;;
"") printf "empty" ;;
*) read $A < <(echo $B) ;;
...
2,387
Posted By rbatte1
As a first query, could we get rid of the sed...
As a first query, could we get rid of the sed part? It more simply written as:-egrep -v "^$|^#" $file

More importantly, do you have a file that contains your environment variables you wish to...
2,387
Posted By Yoda
I noticed that you are using way too many...
I noticed that you are using way too many external commands when all of those tasks can be achieved using shell builtins.

Here is an example:

#!/bin/bash

while read line
do
# Want...
2,387
Posted By Corona688
for x in `cat something` is basically always...
for x in `cat something` is basically always wrong because of the problem you have discovered among others. You could be doing a while read line ; do ... done < inputfile loop.

If your input...
3,229
Posted By neutronscott
... >> ("/dummy/history/history." PMONTH "."...
... >> ("/dummy/history/history." PMONTH "." PFYEAR);
3,229
Posted By Scott
You need to take the variables out of the string...
You need to take the variables out of the string (and not reference them with $), and concatenate the string you want:

"/dummy/history/history." PMONTH "." PFYEAR
Showing results 1 to 7 of 7

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