Skip to content

Bash Array Key from User Input

So I have a bash script which will scan a directory and run a function on a selected input. It seems that for some reason, the key is not setting from the array properly. What am I missing? All help is much appreciated! EDIT: As a side note, I can run the commands separately and get results. Here is the

Creating Linux Alias to list only Directories

I’m wanting to create an alias called dir for KSH that will show only the sub-directories in a cluttered directory with many files and directories. I can output a single-column list of the directories, but I am having a problem converting the single-column list into a multi-column. I want it to automati…

Unable to write on /dev/* files

I’m writing a basic char device driver for Linux kernel. For this, the code flow I have considered is as follows: alloc_chrdev_region() -> to use dynamic allocation of major number class_create() -> to create device class in sysfs device_creat() -> to create device under /dev/ cdv_init() -> …

Using a glob expression passed as a bash script argument

TL;DR: Why isn’t invoking ./myscript foo* when myscript has var=$1 the same as invoking ./myscript with var=foo* hardcoded? Longer form I’ve come across a weird issue in a bash script I’m writing. I am sure there is a simple explanation, but I can’t figure it out. I am trying to pass a…

Using repo with goldfish Android kernel

I was trying to configure repo with a local_manifest.xml file to get the goldfish Android kernel available at: https://android.googlesource.com/kernel/goldfish.git I have written the following local_manifest.xml file that I copied in .repo/manifests/local_manifest.xml: Giving the following command: repo init …