1
  • Determine the script file name in a Bash script

    Would there be a way to determine name of a Bash script that's actually inside the script itself. Here's an example: If my script is in the file "runme.sh", then how would I make it display as "You are running runme.sh" message (without any hardcoding)?

    ITKE351,965 pointsBadges:
  • Write bash script to change current directory to project directory in Linux

    My partner and I have been trying to write a small script that would change the current directory to my project directory. Here's what we have so far: #!/bin/bash cd /home/tree/projects/java We saved the file as proj, changed it to CHMOD, copied it /USR/BIN but when I try to call it by PROJ,...

    ITKE351,965 pointsBadges:
  • Is there a bash script that would kill a child process after a given time?

    We have a bash script that would launch a child process that crashes every once in a while and for no apparent reason too. Because of this, we are trying to launch this process for a certain amount of time and then kill it if it doesn't return successfully. Is there a simple way to do this using...

    ITKE351,965 pointsBadges:
  • Linux: Normalize a file path in Bash

    In Linux, I'm trying to transform /foo/bar/.. to /foo. Does someone know if there's a bash command that does this? Thank you.

    ITKE351,965 pointsBadges:
  • SSH Key Authentication Generator

    Script Name: SSH Key Authentication Generator Language: Bash Purpose: Automate generation of SSH key files (id_rsa & id_rsa.pub for example), for use with passwordless SSH authentication. Notes: This is a modified version of a script I have on my blog,...

    Eric Hansen2,065 pointsBadges:
  • Auto Load USB Printer Firmware When Printer Turned On – Linux

    I am using a derivative of Puppy Linux. I compiled the driver for the HP Laserjet 1020 printer. For the printer to work the firmware has to be loaded every time the printer is turned on. I have added the following command to the rc.local file in Puppy Linux which runs every time Puppy Linux boots...

    Bdika5 pointsBadges:
  • KILLING OLD UNIX PROCESSES

    # I want to be able to extract all the oracleprod processes which are 3 days old and kill them. Are there other date functions or methods can I use? I can make a list of processes but how do I compare the date to kill those processes more than 3 days old. This problem is occurring even though I...

    Geoffreyhalleds0 pointsBadges:
  • BASH: matching a directory in the middle of a path

    How can I do this in bash? find . -name '*\!{*}*' -ls Cf. UNIX Power Tools, page 175. This works in tcsh, but no in bash. In bash I get this message: ff CH18 find: paths must precede expression Usage: find [-H] [-L] [-P] [expression]

    Landocalvinian25 pointsBadges:
  • Command restrictions

    A Linux question: Can you restrict a certain command to a specific time range. I don't want to be able to run command x between 7 and 8 ? Any assistance would be appreciated. Regards

    Renier15 pointsBadges:
  • Obtaining an elapsed-time sorted list of Unix processes from a shell

    I would like to obtain a sorted list of processes, sorted by elapsed time. I am aware of ps -o etime etc, but how exactly do i sort by a field with format [[dd]:[hh]]mm:ss ? Or is there a different way altogether to ask the OS to return a sorted list of processes, sorted by elapsed time? Thanks.

    Nagendra.gd0 pointsBadges:
  • How to modify external environment variable from 2nd shell script

    There are two shell scripts. First one creates variable as: "export VAR1=init_value;" OR "declare -x; VAR1=init_value;" Second script can read this variable and modifies the variable's value but after exiting the variable still keep original value. What is wrong?

    Smooth0 pointsBadges:
1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following