Addition in awk failing
Bash |
https://codedump.io/share/MEfaPJ6nr1sY
|
I am using following code snippet where I export the shell variables in awk as follows:
half_buffer1=$((start_buffer/2))
half_buffer2=$((end_buff...
4 years ago
Dont understand (Pipes) usage unix
Bash |
https://codedump.io/share/5tTftioQ2odk
|
I am studying for 'operational Systems' exams at my uni and i am having hard time understanding pipes usage (|).
Here is an example i found on intern...
4 years ago
Changing bash prompt temporarily by own script
Bash |
https://codedump.io/share/LUzlUYVTpYtu
|
I wanted to write a tiny shell script that shortens the commmand prompt when it gets too long. Setting the PS1 variable in bash works fine. When I try...
4 years ago
Git Checkout Latest Tag
Bash |
https://codedump.io/share/fDrGX7wxRuoH
|
I'm writing a shell script and I'm looking to checkout the latest version of repo. Specifically I want to break this process apart into multiple steps...
4 years ago
How to use bash dialog --yesno correctly
Bash |
https://codedump.io/share/HS1Ss53zcXGX
|
I want a simple Yes/No dialog and do make an action dependent on the users choice. My try so far:
operation=$(dialog --stdout --title "What to do?" \...
4 years ago
Interpreting shell variables in bracket grep
Bash |
https://codedump.io/share/gYCB5VIgcOnI
|
I have command like this :
grep ABC /tmp/dir{1,3,7}/file*.txt
It works perfectly fine, but I need extract constant with filename like this:
FILENA...
4 years ago
Finding next open port
Bash |
https://codedump.io/share/cAO79YkPRlKY
|
Is there any way, using basic Unix commands, to find the next unused port number, starting at port 4444 and going upwards? I'm ssh'ed (via openssh) i...
4 years ago
^H in bash variable
Bash |
https://codedump.io/share/jqCfxvKNmMc
|
#!/bin/bash
echo "hello^H^H" #hello
echo "hello^H^H " #hel o
I know ^H deletes back a letter in console. But why the first echo has no effect and...
4 years ago
Linux: Rename File With Exact Substring
Bash |
https://codedump.io/share/tlePcTtUpTkC
|
I have a JAR file that comes with its version number appended in the file name, and I'd like to rename it to something generic in my crontab shell scr...
4 years ago
Shell Script split concatenate and re-use
Bash |
https://codedump.io/share/u2u7gAEDjUlz
|
In Shell script I want to achieve something like below:
str="india,uk,us,uae"
I want to split it and concatenate each item as below and assign to s...
4 years ago