logo
down
shadow

Using at command in shell script for scheduling a command


Using at command in shell script for scheduling a command

By : user2956937
Date : November 22 2020, 03:03 PM
Any of those help I am trying to use the feature of "at" command to schedule the execution of any specific command at some user defined time. Wondering if its possible using "at" command. I am hoping "at" could help me because I do not have privileges to schedule a cron task. , Use:
code :
echo "touch testfile" | at 03:00
at 03:00 <<EOF
touch testfile
touch testfile1
EOF


Share : facebook icon twitter icon
How to execute next command after Launch Android emulator from command line using shell script?

How to execute next command after Launch Android emulator from command line using shell script?


By : TheNoZZle
Date : March 29 2020, 07:55 AM
I wish this help you Try to add "&" symbol after emulator line command.
>command1 &
mysqldump command works when typed directly into command line - but not in a shell script

mysqldump command works when typed directly into command line - but not in a shell script


By : mattjhunt
Date : March 29 2020, 07:55 AM
hop of those help? The variable your database name is in has a CR at the end. You may need to run your script through dos2unix, or use one of the solutions on this site for stripping CRs from data if you're getting the database name from an external source.
TAR size difference after uploading to Linux server via FTP command or a shell script with FTP command

TAR size difference after uploading to Linux server via FTP command or a shell script with FTP command


By : UnoTurbo
Date : March 29 2020, 07:55 AM
it should still fix some issue If you run dos2unix on your tar file, does it fix the file size? If so, it's because it transferred as ASCII (not binary) regardless of what the program said.
You can specify 'binary' in your script, and if you didn't want to rewrite the script every time, you could also let it read the file name from an argument:
code :
ftp -n 192.168.0.2 <<EOF
quote USER backup
quote PASS backup
binary
cd /mnt/array1/_backup
put backup_20140626
quit
EOF
ftp -n 192.168.0.2 <<EOF
quote USER backup
quote PASS backup
binary
cd /mnt/array1/_backup
put $1
quit
EOF
How to pass a ruby script's output as arguments to a shell command using command substitution?

How to pass a ruby script's output as arguments to a shell command using command substitution?


By : le anh
Date : March 29 2020, 07:55 AM
I hope this helps . The problem is in your bash command. Backtick is escaping the " and '
You can use xargs
code :
ruby a_script.rb | xargs ruby a_script.rb
How can I write a command to shell script from a shell script without evaluating the command

How can I write a command to shell script from a shell script without evaluating the command


By : D. Raz
Date : March 29 2020, 07:55 AM
it helps some times You can try with single quote ('). You have to put the single quote in before the grep command and end of the grep command like below.
code :
#User shell script
cat >test.txt <<EOF
#a bunch of lines that are not relevant
var='`grep examples input.txt`'
/bin/localfoo -${var}
EOF
# pass test.txt to localfoo2
/bin/localfoo2 /test.txt
Related Posts Related Posts :
  • Exchange columns in bash
  • How to set max file size in Linux CeNTOS to server.log
  • Regular expressions: Search a word and append a new word at the end of the line
  • Compress a set of log files in a folder depending on number of files
  • unexpected behavior of linux malloc
  • relation between init and bash terminal process
  • Matlab VideoReader codec error?
  • How to catch the L3-cache hits and misses by perf tool in Linux
  • Executable Deleting Itself on linux
  • How to change the apache httpd port for serving files
  • Installing Patches in linux
  • Comparative analysis between libkvm on linux and NetBSD
  • How to join multiple txt files into based on column?
  • setting LINK variable in Makefile generated by qmake (5.0)
  • Automake - difficulty with installing version 'automake-1.14.1'
  • How to use Linux Network Namespaces for per processes routing?
  • How can I write a Gruntfile with different shell command behaviour for OS X vs. Linux?
  • Is there a method to figure out the audio channel layout in Linux?
  • Setting environment varilable for daemon / root process
  • string replacement in shell script
  • Add specific column to the end of a CSV file
  • Are there programmable automount/autofs hooks in linux/systemd?
  • Renaming files like 20141207_190822.jpg to "2014-12-07 19.08.22.jpg" in linux or MacOS X
  • undocumented kernel boot parameter?
  • using wget to mirror a website with path and subfolder that have the same name
  • Using awk to find data matching date range in text file
  • Installing xorg-x11-devel package in SLES 11 SP2
  • Setting result of find to variable, which has variables within it
  • Maximum/Minimum physical address - Linux kernel
  • Freepbx custom context outbound route
  • memcpy implementation in linux kernel
  • How to reverse a list of words in a shell string?
  • Concatenate and pass as parameter in bash
  • Add user to Docker container
  • How to add a content in a file in linux without opening the file using vi or cat command
  • Which SVN subversion can I use on linux, Mac, Windows?
  • Work with ZIP archive at Bash
  • bash script not running as expected from cron vs. shell.
  • Compare one field, Remove duplicate if value of another field is greater
  • sudoers NOPASSWD: sudo: no tty present and no askpass program specified
  • How do I use pipes and variable substitution in a shell script (for toggling haproxy active server)?
  • Linux/Unix Find Command
  • Not able to copy data in hdfs with hdfs dfs commands
  • Linux : Remove/Delete .txt files ending with exactly five digits
  • ARM assembly "retne" instruction
  • Migrate from LXC to LXD
  • sbt on linux not accepting -jvm-debug 5005
  • Supervisord events only sent to one eventlistener in pool
  • Finding all .c files in linux using grep
  • Extract part of a file name in bash
  • Bash Script to Comment/uncomment lines in file
  • Linux audio control web alsamixer
  • Can't remove first two encode characters using text editors in linux
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org