Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. N

    Bash script for diagnosing problems with running software inside of terminal

    This script is actually kinda unnecessary on a linux system because you just have to try running a program through the terminal in order to figure out that you haven't installed it: kerblunk kerblunk: command not found However, if you are looking for more information, then this script might...
  2. N

    Compare your text files in a nuanced/complex way

    Here is a bash script (on windows, i think "git for windows" would allow you to run this, the commands are typically native to linux...) that allows you to print lines that match or are different in a file: #!/bin/bash #easier to read format for showing differences between files SCRIPT=$0...
  3. N

    is "rand() % 100;" not very random?

    I'm just wondering if what the folks on this stack is totally true, or maybe is outdated, and if it is true, then what they mean: https://stackoverflow.com/questions/1202687/how-do-i-get-a-specific-range-of-numbers-from-rand The thread is over 13 years old, but when I test that particular way...
  4. N

    How exactly does sed view meta characters when you replace or delete text?

    I'm trying to figure out how to use sed without erasing extra things that i want to keep in the document. So far, i've realized that sed is largely user-friendly in terms of how it does away with strings and numbers: sed -i '/cow/d' <file> sed -i '/10/d' <file> in both of these examples...
  5. N

    How does the su program block automated input from bash?

    As a novice programmer, I would think that this would put a password into the "su" command in linux and then validate the password: echo <my-password> | su | echo However, i've tried many variations of this (even using printf) and for some reason at best the password prints on the screen and...
  6. N

    Answered How would i make a for loop generate text side by side instead of in newlines?

    For example, normally for loops do text like this: for num in 1 2 3 4 5; do echo "$num" done 1 2 3 4 5 But what would you need to generate this outcome: 1 2 3 4 5
  7. N

    How do I add "solved" after a problem has been solved?

    You can always do it at the start of the thread, but how do I perhaps make it clearer to everyone else that it's a solved thread? Is there an edit button somewhere?
  8. N

    Answered Bash: How would i make this code into a script that uses a single file as input?

    I found this series of commands online for copying a file multiple times...the way this is, all you have to do is put a real file's name in place of <input-file>, and then choose a name for the duplicates (it can be the same since the loop will suffix numbers to the name anyway...): for i in...
  9. N

    Python Does python have good text editing capabilities?

    I'm curious since python has such broadband capabilities, I was pretty pleased with sed (a bash program that allows fairly easy text manipulation), yet I've been assured that perl and awk are better than sed, but neither of those languages seem terribly appealing.
  10. N

    Bash: Syntax questions about this script's errors

    read greeting case "$greeting" in "fu*k you" ) echo "fu*k you too!" ;; [Nn][Yy] ) echo "I think you meant to type yes or no..." ;; "Hello?" ) echo "Hello there, aren't you sexy!" ;; "i hate you" | "die, please" | "nerd" | "fu*k off" ) echo "wow! soooo polite!"...
  11. N

    Hello everyone

    I was just looking for a forum on programming in particular, i already have a username on stack exchange and another computer related forum. I'm currently learning BASH scripting, and i'm interested in C/C++, assembly language, and practically all the web languages.
Back
Top Bottom