Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 09 15:56
    davidpfarrell commented on 5a2dbd4
  • Nov 09 11:15
    Jemmy-dotcom commented on 5a2dbd4
  • Nov 08 01:49
    cornfeedhobo commented #1284
  • Nov 07 15:13
    marcelloinfoweb commented #1440
  • Nov 07 13:39
    ishpartko commented #1415
  • Nov 07 13:39
    ishpartko commented #1415
  • Nov 07 13:32
    AmberWilliams commented #1415
  • Nov 07 02:21
    cornfeedhobo commented #1284
  • Nov 07 02:15
    davidpfarrell edited #1449
  • Nov 07 02:14
    cornfeedhobo synchronize #1284
  • Nov 07 02:12
    davidpfarrell synchronize #1449
  • Nov 07 02:06
    cornfeedhobo synchronize #1284
  • Nov 06 23:11
    davidpfarrell opened #1450
  • Nov 06 22:55
    davidpfarrell opened #1449
  • Nov 05 18:34
    davidpfarrell commented #1350
  • Nov 05 18:14
    davidpfarrell commented #1350
  • Nov 05 05:37
    davidpfarrell opened #1448
  • Nov 05 05:30
    davidpfarrell opened #1447
  • Nov 05 05:21
    davidpfarrell opened #1446
  • Nov 05 05:11
    davidpfarrell opened #1445
Abdullah Yiğiterol
@abdllhygt
Hey how are you! can i ask about bash in this group?
Corey Cole
@CoreyCole
Can anyone help me with string escaping? I have a script that runs as the root user when my server bootstraps. At the end of that script, I echo a line to the ubuntu user's ~/.zshrc file. My problem is that the colors codes in the string evaluate when the bootstrap script runs, but I need those colors to not be evaulated until the user logs in and the ~/.zshrc file is read. More detail here: https://stackoverflow.com/questions/52415887/installing-oh-my-zsh-for-a-different-user-as-root-in-cloud-init-script
Corey Cole
@CoreyCole
I solved by using bash variables to postpone the evaluation of the colors/commands :D
ArchaicLord
@ArchaicLord
Hello, I use zsh and a plugin. I created an alias for said command. I want to run that command as a keyboard shortcut in KDE. I tried changing script to !#/bin/zsh. I always get message saying command not found. How do I get bash/she to recognise zsh plugins and commands?
Michael
@g4m3rm1k3
I made a developement group in Discord for people who are learning from all sorts of places https://discord.gg/FaP3g3P
Peter Bittner
@bittner
Is there a Git shortcut for gc! --no-edit? (equivalent to "git commit --amend --no-edit")
Not really, right? (source) -- Should we add one?
vandevelden
@vandevelden
I have a question regarding using nohup on bash process. Is this the right channel ?
thanks!
Truong Ma Phi
@trmaphi
Is there a way to locate your own theme, other than ‘themes’ directory?
Peter Bittner
@bittner
@bpetersen This Gitter room is about Bash-it. Not about Bash and Bash concepts.
Barton Petersen
@bpetersen
@bittner Oh, my apologies! I’ll remove the clutter.
Gaspar Reyes
@zurdors
@scottdillon_gitlab, thank! it is perfect to illustrate tutorials.
Nadia
@nadiaschutz
hi
Ben Chiciudean
@benydc
hello
using declarative associate arrays, how do I loop in order? my code:
declare -A migration8=(
    [CSV_FILE]='professional-migration.csv'
    [CSV_COLUMNS]='created_at,updated_at,job_title,years_of_experience,country,city,zip_code,street_address,id,company_id'
    [TARGET_TABLE]='professionals'
    [TARGET_COLUMNS]='created_at,updated_at,job_title,years_of_experience,country,city,zip_code,street_address,id,company_id'
)
declare -A migration9=(
    [CSV_FILE]='professional-user-migration.csv'
    [CSV_COLUMNS]='created_at,updated_at,first_name [null if blanks],last_name [null if blanks],email,phone_number [null if blanks],meta_id,meta_type,state'
    [TARGET_TABLE]='users'
    [TARGET_COLUMNS]='created_at,updated_at,first_name,last_name,email,phone_number,meta_id,meta_type,state'
)
declare -A migration10=(
    [CSV_FILE]='professional-expertise-migration.csv'
    [CSV_COLUMNS]='professional_id,expertise_id,created_at,updated_at'
    [TARGET_TABLE]='professional_expertises'
    [TARGET_COLUMNS]='professional_id,expertise_id,created_at,updated_at'
)
declare -A migration11=(
    [CSV_FILE]='professional-language-migration.csv'
    [CSV_COLUMNS]='professional_id,language_id,created_at,updated_at'
    [TARGET_TABLE]='professional_languages'
    [TARGET_COLUMNS]='professional_id,language_id,created_at,updated_at'
)

GLOBAL_TARGET_URL="postgresql://ben.wolfpack@localhost:5432/pof-api_development"

declare -n migration
for migration in ${!migration@}
do {
    export CSV_FILE=${migration[CSV_FILE]}
    export CSV_COLUMNS=${migration[CSV_COLUMNS]}
    export TARGET_URL=${GLOBAL_TARGET_URL}
    export TARGET_TABLE=${migration[TARGET_TABLE]}
    export TARGET_COLUMNS=${migration[TARGET_COLUMNS]}

    pgloader template.sql
} done
Peter Bittner
@bittner
@benydc Is this a general question about Bash? Note that this Gitter room is about Bash-it. (Not about Bash and Bash concepts.)
Leo Wong
@LeoWW
Hey guys, just wondering how does bash-it completion work? I tried bash-it enable completion git to enable git completion, sourced my bash_profile, and it didn't seem to do anything. However, sourcing the git completion directly via source "$BASH_IT"/completion/available/git.completion.bash does the trick
deepgrace
@deepgrace
Awesome Tetris in Bash https://github.com/deepgrace/tetris
Joseph Leroux
@JosephLerouxBook
basicly my objectives is to launch "ui.exe" wich is a windows form made in C# and compiled earlier. Maybe i didnt understand totaly the purpose of "case $1 in start". wich i understood like a "Switch" statement but i dont get why doesnt it launch when i ./that_script but it work when i ./ui.exe
Thanks again everyone, cya :)
Joseph Leroux
@JosephLerouxBook
(just in case : i had an 'Echo "p"' right before the line 14, it doesnt even print. i swear it is frustrating ^^)
Peter Bittner
@bittner
@JosephLerouxBook TL;DR It may be that the double semicolon ;; must be indented. Take a look at other example out in the wild, e.g. https://gist.github.com/drmalex07/298ab26c06ecf401f66c
Joseph Leroux
@JosephLerouxBook
In order to not bother the people working on Bash-It, i made a community to help people with shell (and so bash). Thanks guys. Cya
razou
@razou
Hi @Here
When I try to compute 2**64 in a bash script I’m getting -9223372036854775808 instead of positive number. How can I fiw this ? Thanks
John
@flyboy1565

hey looking for some help writing a function. I want to be able to pipe data into it and echo the line and then write to a file.
I wrote this, but I want the user to see it without the TS, script and user (basically just the line)

function log () {
  while read -r line; do
    echo "$(date "+%Y-%m-%d %H:%M:%S") $scriptName:$USER --- $line"
  done |tee -a $logFile 2>&1
}

current output to file and screen is

flyboy1565@linux:~$ echo "TEST" |log
2019-08-15 13:27:07 test.sh:flyboy1565 --- TEST
any help would be great
deepgrace
@deepgrace
log() { while read -r line; do echo "${line}" done | tee -a $logFile 2>&1 }
sancroth
@sancroth
hey there! quick question. I am calling a function that takes a bit. So i m using a kind of progress bar i found around, dont want to waste to much time on it.
set_group_flag & PID=$! #simulate a long process
The problem is that when the 1st process has something to print it all breaks apart visually
how can i keep the functions output and print it in the end?