[Solved] how to convert char in octal format without standart C functions like print(f) [closed]

Decimal and octal are number bases, this only matters when presenting a number (or when inputing a number); the actual number is generally stored in binary in the computer’s memory but this doesn’t often matter to typical programs. In your case, conversion to octal generally involves extracting three bits at a time (since 23 is … Read more

[Solved] reading properties from ini file in a bash script

It can be done pretty easily using Awk, just do the below to store the contents in a bash array. read -p “Enter object to get properties for: ” objectname all_properties=($(awk -F ‘=’ -v input=”${objectname}” ‘$1 ~ input{flag=1; next} $1 ~ /\[object/{flag=0; next} flag && NF {split($0,arr,”=”); print arr[2] } config.ini)) Now loop the array … Read more

[Solved] How To Install Eclipse On Linux

1. Install Java. Don’t have Java installed? Search for and install OpenJDK Java 7 or 8 via Software Center. Or install oracle java by following this post. 2. Download Eclipse from its website. Check out your OS Type, 32-bit or 64-bit, by going to ** System Settings -> Details -> Overview,** then select download Linux … Read more

[Solved] Some troubles with using sed and awk [closed]

From what we can discern of this question, you’re attempting to create a programmatic rule to rename files ending in extensions stdout-captured, stderr-captured, and status-captured (assuming one typo) into files ending in extensions stdout-expected, stderr-expected, and status-expected, respectively. Obviously, if each of these definitions is inclusive of exactly one file, a rote mv may be … Read more

[Solved] Replacing first occurrence of comma in unix shell script

sed is your friend. The result can be stored in a new file. Give a try to this tested command below: sed s/,/\’,\’/ file.txt > result.txt The sed man page contains information. The test output: $ cat input.txt apple,orange,house foo,bar,woops $ sed s/,/\’,\’/ input.txt > result.txt $ cat result.txt apple’,’orange,house foo’,’bar,woops solved Replacing first occurrence … Read more