Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:00:21+00:00 2026-05-28T08:00:21+00:00

I am coding a little script to save some data from Internet every single

  • 0

I am coding a little script to save some data from Internet every single day.
So I am using xdotool to simulate all my navigation until the point I have the save window of firefox in front of me, I mean, in front of my script. OK, all right until here… But, when I try to use the day of the week(or any data in the i variable) as a part of the filename to be saved……….. hmmm –> “nothing happens”. =(

Well, I guess I have some simple problem here, I have tryed very ways to use the content of the variable I got with the date function, or simple pipe directly, but xdotool refuses to type this info into the filename box in save file window, which is obvius selected and text highlighted.

Some light in the path, Masters! I am a terrible noob! Sorry! =) So this is the code I tryed,(problem in last line):

#!/bin/bash

i=|date +%A
echo $i

WID=`xdotool search --name "Mozilla Firefox" | head -1`
xdotool windowactivate $WID
xdotool key ctrl+l
xdotool type "http://whatever.com.au"
xdotool key Return 
sleep 2
xdotool key ctrl+s
sleep 2

xdotool type WeekDayIs$i

I guess I am missing something really obvius, maybe some typecasting….

I’m really a begginner, so don’t blame me so much. I tryed with "$i" and {"$i"} and '$' too.. nothing works… =/ Thanks everybody.

ps: AND, if some nice dude want to point me out a straight way to save directly some web content to a file, maybe I walk on my knees to him.. 😉
EDIT : I got the answer to this question too here

EDIT POS-SOLUTION:

yes shellter, this code prints out Tuesday and YesTuesday and not 3 more times Tuesday. hehe, one day after another. Thanks for your attention.

#!/bin/bash
i=|date +%A
echo $i
echo $i
echo $i

i=$(date +%A)

echo Yes$i
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:00:22+00:00Added an answer on May 28, 2026 at 8:00 am

    I don’t know anything about xdotool, but one issue is obvious, correct this and then edit your post if it is not resolved, and include specific text of error messages.

    change

    i=|date +%A
    

    to

    i=$(date +%A)
    

    Then when you execute your last line

    xdotool type WeekDayIs$i
    

    $i will have a value.

    IHTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am coding a little bookmarket to convert all the devises in the current
I'm coding a simple little class with a single method send an email. My
I'm essentially writing a little script that needs to save several different files as
I was working on a little script that would do some logging for me
Not really a coding question more a little help with my idea of a
I've been coding in C# for a while, A little over a year professionally,
I'm coding in vb.net, and I haven't in forever so I'm a little rusty
Is there any widely used SQL coding standard out there? SQL is little bit
I have been coding with C# for a good little while, but this locking
So, I've been coding for a little (2 years), and I have a very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.