Tagged Questions
0
votes
2answers
153 views
Why screen is not splitting my GNOME terminal?
I am working in a remote Linux box using VNC.I have a single terminal with lots of tabs opened in my system. How can I split them using the screen utility? Does the screen utility work with already ...
1
vote
2answers
67 views
Best way to call command within a shell function having the same name [duplicate]
I like to encapsulate commands within shell-functions using the same name. But to avoid the shell-function calling itself recursively, I specify the complete path of the command as the following ...
1
vote
1answer
80 views
What does sourcing a file mean in a shell? [duplicate]
Possible Duplicate:
Different ways to execute a shell script
What happens when I issue the following command:
source devenv.csh
How does it differ from running it just as devenv.csh ?
2
votes
3answers
156 views
What are commands to find shell keywords, built in functions and user defined functions?
I was discussing with my friend on how the commands are parsed in the shell, and he told me that bash searches the command in following order
List of aliases
List of shell keywords
List of ...
1
vote
2answers
1k views
tar: Unexpected EOF in archive
I am trying extract .tar.gz file it but with no luck
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
the ...
4
votes
3answers
216 views
Test command in unix doesn't print an output
When I type this in the terminal
test 4 -lt 6
I don't get any output. Why not? I need that 0 or 1
3
votes
3answers
565 views
Split command output by linebreak?
I have a command returning multiple lines. For further processing I need to process each single line of those lines.
My current code works by modifying the IFS (Internal Field Separator):
...
7
votes
2answers
2k views
How to run time on multiple commands AND write the time output to file?
I want to run time command to measure time of several commands.
What I want to do is:
Measure the time of running of all of them added together
Write the time output to a file
Write the STDERR from ...
0
votes
2answers
129 views
Why does this compound command report errors when copying directories?
if one executes the following two commands in one line, as follows,
rm -rf dir ; cp -r dir2 dir
it may complain that cp can not create directory dir/subdir: File exists
but if these two commands ...
3
votes
3answers
251 views
Get a list of 3 letter commands on Mac OS X
How can I either create or find a list of 3-letter unix commands on Mac OS X?
I'd like to create a new program/command for a project. I'd like to make it a 3-letter name, but I don't want to conflict ...
3
votes
1answer
441 views
Make awk use bash with the system() command
Is there a way to make awk use bash instead of sh when running system commands using the system() call?
I want to use some bash-specific features such as [[ ]] and < > string comparison operators:
...
57
votes
6answers
4k views
Why is cd not a program?
I've always wondered why cd isn't a program, but never managed to find the answer.
Anyone know why this is the case?
3
votes
1answer
155 views
Searching a file & excluding lines with a specified string
I have a large log file that contains numerous lines of the same entry, lets call it "repeat-info". As an example here is what a portion of the log might look like:
[Timestamp] repeat-info
...
16
votes
3answers
572 views
Which are the standard commands available in every Linux system?
I would like to know which are the standard commands available in every Linux system.
For example if you get a debian/ubuntu/redhat/suse/arch/slackware etc, you will always find there commands like:
...
3
votes
2answers
597 views
How to execute one command on all files within a folder
Saying, I have this tree and I want to execute ruby on all scripts within the folder. How could I archive through one line of command.
./
../
rb-script/
sample1.rb
sample2.rb
0
votes
3answers
501 views
What is the purpose of -e in sed command?
I can't find any documentation about the sed -e switch, for simple replace, do I need it?
e.g.
sed 's/foo/bar/'
VS
sed -e 's/foo/bar/'
4
votes
5answers
253 views
Execute string result from shell script as a set of shell commands
I create a string result from my shell script and i want to execute it as a shell command.
For example file_a is:
user1@gmail.com
user2@gmail.com
script:
awk '{print "mail -s \"welcome\"", $1}' ...