☆ Yσɠƚԋσʂ ☆

  • 412 Posts
  • 405 Comments
Joined 5 years ago
cake
Cake day: January 18th, 2020

help-circle

  • I think the trick has to be that somebody who has a bit of technical skill sets the laptop up initially. I did this for my mom a while back, and once I set it up once, it just worked from there on. Non technical users tend to have a fairly small set of things they need to do like check email, browser the web, and play media. Once that’s working, they never need to change anything. In fact, they don’t want to change anything because they get used to the workflow, and they’re comfortable.

    It would be great if people set up community centres where people can bring their old laptops, and somebody switches them over to Linux for them.
































  • here’s what DeepSeek gave me for the following prompt: write a small bash script to check if a CSV exists and if it does rename to the filename_date.CSV and upload to hdfs, keep it simple

    #!/bin/bash
    
    # Check if filename argument is provided
    if [ $# -eq 0 ]; then
        echo "Usage: $0 <csv_filename>"
        exit 1
    fi
    
    CSV_FILE="$1"
    
    # Check if file exists
    if [ ! -f "$CSV_FILE" ]; then
        echo "Error: File $CSV_FILE not found!"
        exit 1
    fi
    
    # Generate new filename with date (YYYYMMDD format)
    DATE=$(date +%Y%m%d)
    NEW_FILENAME="${CSV_FILE%.*}_${DATE}.csv"
    
    # Rename the file
    mv "$CSV_FILE" "$NEW_FILENAME"
    
    # Upload to HDFS
    hdfs dfs -put "$NEW_FILENAME" /path/to/hdfs/directory/
    
    echo "Successfully processed: $NEW_FILENAME"