About 1,070,000 results
Open links in new tab
  1. bash - Script to change current directory (cd, pwd) - Unix & Linux ...

    I want to run a script to simply change the current working directory: #!/bin/bash cd web/www/project But, after I run it, the current pwd remains unchanged! How can I do that?

  2. linux - How to execute shell script via crontab? - Super User

    Your script is missing a #! line at the start, which is the magic interpreted by the kernel to say which command interpreter is to be used for the script. Make it look like this: #!/bin/sh notify …

  3. How do I compare two files with a shell script? - Super User

    Given two files, I want to write a shell script that reads each line from file1 and checks if it is there in file2. If a line is not found it should output two files are different and exit. The fil...

  4. shell script - Loop through a folder and list files - Unix & Linux ...

    I have a folder named 'sample' and it has 3 files in it. I want to write a shell script which will read these files inside the sample folder and post it to an HTTP site using curl. I have written ...

  5. shell script - How to execute .sh files on Windows? - Super User

    0 To run the shell script from the windows. First use the command : dos2unix then you can use your normal command : sh runide.sh This will work out.

  6. What does $# mean in shell? - Unix & Linux Stack Exchange

    What does $# mean in shell? I have code such as if [ $# -eq 0 ] then I want to understand what $# means, but Google search is very bad for searching these kinds of things.

  7. How to use source command in shell script? - Super User

    Quick answer: source is BASH SHELL BUILTIN command. See man bash (search for " source filename [arguments] " to find it). It doesn't work in question probably because you are using …

  8. How to compare two dates in a shell? - Unix & Linux Stack Exchange

    0 The reason why this comparison doesn't work well with a hyphenated date string is the shell assumes a number with a leading 0 is an octal, in this case the month "07". There have been …

  9. looping through `ls` results in bash shell script - Super User

    169 Does any one have a template shell script for doing something with ls for a list of directory names and looping through each one and doing something? I'm planning to do ls -1d */ to get …

  10. How can I assign the output of a command to a shell variable?

    A shell assignment is a single word, with no space after the equal sign. So what you wrote assigns an empty value to thefile; furthermore, since the assignment is grouped with a …