bash – Why do I need to run source command for .bashrc alias to get applied?

While I understand that source command executes a program in the current shell, I don’t quite understand why we need to run source .bashrc to “reload” the .bashrc file.

From my understanding, we do not run any script by adding an alias to .bashrc – with source .bashrc we just “reload” the file.

Why does not it reload automatically?

Probably, I’m missing something.

How does it work under the hood? Why do we need to source this file to get new aliases working without login out?

bitcoind – How do I open bx-linux-x64-qrcode via the command line on Ubuntu 20.0 in order to get access to the BX command tool

I have tried for three days now to get access to the BX commands, via the libbitcoin-explorer library. I have gone through various tutorials and have tried the install process and i do have a build-boost file where its supposed to be. While it appears that everything has worked, I still cannot use the bx command tools.

I then tried to download the simple executable file from https://github.com/libbitcoin/libbitcoin-explorer/wiki/Download-BX but I have no idea how to open the file. It is bx-linux-x64-qrcode. My system cant open it via the files app or ubuntu software and I cant figure out how to interact with this file via the command line either.

Please help.

powerapp – Patch Command Not Working, Creating the Record in the Existing Item

I have an application which have 3 leave types to select for the leave request,I am using a form control but submitting the data using the Patch Function.
I am showing the form fields according to the leave request selected in the dropdown in my form.

and on submit button I have set this Code:

   If(DataCardValue1.Selected.Value = "Time Off",
Patch(
   LeaveRequests,
   {
       ID:LeaveGallery.Selected.ID
       
    
   },
{
   LeaveID: CurrentUserID,    
   User:     DataCardValue6.Text,
   Requestor: MyUserEmail,
   Approver:
   {
 Claims: Concatenate(
          "i:0#.f|membership|",
          DataCardValue3.Selected.Email // Person email
          ),
          Department: "",
          DisplayName: "",
          Email: DataCardValue3.Selected.Email, // Person email
          JobTitle: "",
          Picture: ""
},
 Description: DataCardValue2.Text,
   TimeOffDate: DataCardValue22.SelectedDate,
   TimeOffFrom: DataCardValue19.Selected,
   TimeOffTo: DataCardValue20.Selected,
   TotalTimeRequested: Label23.Text,
   LeaveStatus:"Pending"
    }
  ),DataCardValue1.Selected.Value = "Annual Leave",
Patch(
   LeaveRequests,
   {
       ID:LeaveGallery.Selected.ID
       
    
   },
{
   LeaveID: CurrentUserID,    
   User:     DataCardValue6.Text,
 Requestor: MyUserEmail,
   Approver:
   {
 Claims: Concatenate(
          "i:0#.f|membership|",
          DataCardValue3.Selected.Email // Person email
          ),
          Department: "",
          DisplayName: "",
          Email: DataCardValue3.Selected.Email, // Person email
          JobTitle: "",
          Picture: ""
},
 Description: DataCardValue2.Text,
   StartDate:StartDate.SelectedDate,
   EndDate:EndDate.SelectedDate,
   DaysCount:Label25.Text,
   LeaveStatus:"Pending"
    }
),
DataCardValue1.Selected.Value = "Sick Leave",
Patch(
   LeaveRequests,
   {
       ID:LeaveGallery.Selected.ID
       
    
   },
{
   LeaveID: CurrentUserID,    
   User:     DataCardValue6.Text,
 Requestor: MyUserEmail,
   Approver:
   {
 Claims: Concatenate(
          "i:0#.f|membership|",
          DataCardValue3.Selected.Email // Person email
          ),
          Department: "",
          DisplayName: "",
          Email: DataCardValue3.Selected.Email, // Person email
          JobTitle: "",
          Picture: ""
},
 Description: DataCardValue2.Text,
   StartDate:StartDate.SelectedDate,
   EndDate:EndDate.SelectedDate,
   DaysCount:Label25.Text,
   LeaveStatus:"Pending"
    }
),
DataCardValue1.Selected.Value = "Casual Leave",
Patch(
   LeaveRequests,
   {
       ID:LeaveGallery.Selected.ID
       
    
   },
{
   LeaveID: CurrentUserID,    
   User:     DataCardValue6.Text,
   Requestor: MyUserEmail,
   Approver:
   {
 Claims: Concatenate(
          "i:0#.f|membership|",
          DataCardValue3.Selected.Email // Person email
          ),
          Department: "",
          DisplayName: "",
          Email: DataCardValue3.Selected.Email, // Person email
          JobTitle: "",
          Picture: ""
},
 Description: DataCardValue2.Text,
   StartDate:StartDate.SelectedDate,
   EndDate:EndDate.SelectedDate,
   DaysCount:Label25.Text,
   LeaveStatus:"Pending"
    }
)
);
 Navigate(SucessScreen,None); 

after submitting it stores the data into SP list, but when I create another record it overwrites onto the existing one, without creating a new record.

any help?

command line – dd from dvd to apfs on Catalina is writing very slow

I did

dd if=/dev/disk2 of="disk 1".iso bs=1m 

where disk2 is a DVD video. After about 30 minutes, dd spewed out the usual message of

7662+1 records in
7662+1 records out
8034680832 bytes transferred in 2007.685274 secs (4001962 bytes/sec)

but I didn’t get my prompt back. I checked (from another shell) and the image was 800+Meg and growing. It is now 6.7G and still growing and I figure somewhere something has a ton of data stored. Perhaps dd forks with one process reading and the other process writing with the data between the two going over a pipe. But, this is new with Catalina.

Has anyone seen this before? Is there a way to speed things up? This is going to end up taking over an hour to copy one DVD. This is on a laptop and the hard drive is an SSD.

perl – How to change one line of code in a block of code from linux command line?

I have a change I need to make across multiple different sites and may need to make again in the future, so I’d like to put it in a shell script. Essentially I want to find a specific class block in a css file, find one of its attributes and change the value of that attribute.

So for example:

.some-id {
  some-arbitrary-properties
  property-i-want: old-value
  maybe-some-more-properties
}

I want to only change old-value in property-i-want, and only if it’s in .some-id.

I’m very comfortable with grep, but it only works one line at a time. I’m somewhat less comfortable with sed, but I haven’t seen any way to do this without a deterministic set of properties. For instance, I could have sed replace the entire block. But I want to leave any other properties in the block alone.

I’d rather not use perl or python, but I can. I’d like to keep it short, because it’s going in a script of one-liners.

networking – Internet needs dhclient command to connect

I’m running a headless server on ODROID-C1 with Ubuntu 18.04. I connected to Wifi with wpa_supplicant and iwconfig shows the correct SSID association, but on startup it does not work – ping google.com returns Temporary error resolving host, and ping 192.168.1.1 (the router IP) returns connect: Network unreachable.

To get the internet to work, I have to run dhclient -4 to fix it, and after a while it breaks again?

This happens with Ethernet and Wifi connections.

What is going wrong? What should I do to fix it permanently? (I don’t want to have to run this command blind every time it is started)

Any help is appreciated.

command line – How to Source the .bash_profile?

I was following this article to get rid of

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
and whenever I’d do . ~/.bash_profile it would result in

-bash: /home/nikhil/.bash_profile: line 1: unexpected EOF while looking for matching `"'
-bash: /home/nikhil/.bash_profile: line 2: syntax error: unexpected end of file

So, I searched askUbuntu and find this and according to one of the solutions provided,

I went to Edit -> Profile Preferences -> Title and Command tab and checked the “Run command as a login shell” option. But now as soon as I open any terminal I get the first two lines as

-bash: /home/nikhil/.bash_profile: line 1: unexpected EOF while looking for matching `"'
-bash: /home/nikhil/.bash_profile: line 2: syntax error: unexpected end of file

and the same if run . ~/.bash_profile. Please help.

assembly – Is there a way to specify syntax for x command output?

I want to know whether I can change the syntax of the output of the following command:

x/1i $rip

Now it gives output like that. I guess it is AT&T syntax, correct my if I’m wrong (newbie):

->  0x100000f96: bf 01 00 00 00  movl   $0x1, %edi
    0x100000f9b: be 02 00 00 00  movl   $0x2, %esi
    0x100000fa0: ba 03 00 00 00  movl   $0x3, %edx
    0x100000fa5: b9 04 00 00 00  movl   $0x4, %ecx
    0x100000faa: e8 b1 ff ff ff  callq  0x100000f60               ; test_func at main.c:4

What I want is to something like -F flag in the following command disassemble -n main -F intel. Is there any way to achieve that. I have not found anything neither using help x nor by googling. Thanks in advance!

Note: I am using lldb as a debugger.