The term 'shell' refers to a general class of text-based command interpreters most often associated with the Unix & Linux operating systems.

learn more… | top users | synonyms (3)

1
vote
0answers
7 views

mongo : get one attribute from a

in mongo shell or PHP how do I retreive the "list" attribute of this document ? { "_id" : ObjectId("51b972ebe4b075a9690bbc5b"), "list" : [ "Environnement", "Toutes thématiques", "Transports"] }
0
votes
0answers
3 views

Configuring sublime text build system to use shell script

I have a shell script with various functions defined and all accessible via the terminal by including the following line in bash_profile: source ~/hcom-env/conf/sys/hcom-profile However when I try to ...
3
votes
1answer
38 views

How to call a bash script automatically when a directory containts chage

My goal is to run a bash script automatically whenever any new file added to a particular directory or any subdirectory of that particular directory. Detail Scenario: I am creating an automated ...
0
votes
0answers
11 views

Running script on a remote server in bash working on 1 server, not on the other

When I am running this script on 2 servers in hostnames, it succeeds on one of them, but not on the other. The log output is pretty ugly, so I won't post all of it. Here is part of the bash_history, ...
0
votes
4answers
25 views

Script complains about `sed: option requires an argument — e` and `No such file or directory`

In my script, I am taking a text file and going through the file line by line and replacing the string "test" with "true", then redirect it to a new file. Here's my code: cat $FILENAME | while read ...
1
vote
2answers
38 views

what wrong with my regular expression

I have a simple regular expression, and testing egrep on hexadecimal numbers regex="^([0-9A-Fa-f]{2})(:[0-9A-Fa-f]{2})*$" when i try to echo any Input it's just print Nothing echo "fe:fe" | egrep ...
-3
votes
1answer
27 views

Does node.js shell have commands like python type? [duplicate]

I want to know whether a object is null or undefined so I use the following code: if(obj==='undefined'||obj===null) But it doesn't seem to work. Is there similar python type command to get the type ...
-1
votes
1answer
23 views

shell script for convert block data into command [closed]

Please help me to write script Details: I have text file with following sample data; static-mapping 204-desktop ip-address 192.168.100.134 ...
0
votes
2answers
24 views

Is there some shell full path function?

Is there some native function(shell, linux command) to merge/compute the full path? example: old_path="~/test1/test2/../dir3//file.txt" new_path=FUN($old_path) echo "$new_path" // I want get this ...
0
votes
1answer
15 views

Unset a argument variable

I have created a script in sh shell. #script.sh echo $1 if [ x$1 = 'x' ] then echo CODE1 else echo CODE2 fi 1) if I am running it using . ./script.sh OUTPUT: CODE1 2) If I run it like . ...
1
vote
2answers
22 views

Extract nodes from xml based on keywords

I have an XML like below and am trying to extract the nodes based on a keyword. Tried using XPath and XMLLint. But obviously, I'm not doing something right. So hoping for some help in this regard. ...
0
votes
2answers
36 views

BASH scrip expecting then, when else is needed

I am trying to run a shell script called graphhopper.sh in Ubuntu 12.04 which was given by a website. When I run it, terminal produces : not found.sh: 2: graphhopper.sh: graphhopper.sh: 39: ...
-1
votes
0answers
8 views

unable to post to HabitRPG API via curl [closed]

Ugo Landini's Pomodoro allows start / stop custom scripts, and I found this code that should let me post to the HabitRPG api: do shell script "curl -X POST -H 'Content-Type:application/json' ...
0
votes
1answer
34 views

Rename files within folders to folder names while retaining extensions

I have a large repository of media files that follow torrent naming conventions- something unpleasant to read. At one point, I had properly named the folders that contain said files, but not want to ...
0
votes
2answers
30 views

How come setting Bash's IFS to newline breaks command substitution and export?

I am writing a bash script that loops over the output of a command substitution and then tries to perform another command substitution within the loop body. Here is the code: #!/usr/bin/bash ...

1 2 3 4 5 1142
15 30 50 per page