I'm trying to write a utility script that defines certain aliases.
My SHELL is tcsh (can't change that).
I tried the following
#!/bin/tcsh
alias log 'less ~/logs/log.date '+%Y%m%d'''
Then I run it like this:
./myscript
log
The output I get is: log: Command not found.
Naturally if I run it like this:
source myscript
log
Everything is fine.
Any way to do it without specifying source ...?
I would need little help from you.
This is first time I see something like this happen to shell in Windows 7, as you can see, tabs and buttons in some programs, or control panel (see screenshot) are like those in basic Windows theme.
Of course, there is selected 'Adjust for best appearance' in System Properties, so it's not making a problem, also Aero theme is enabled, which is obvious.
What could be solution for this?
The word "functionalities" is not in the English language as far as I know. You should just say "functionality" in this document: http://support.microsoft.com/kb/950263/ "New features and functionality" Cheers
The word "functionalities" is not in the English language as far as I know. You should just say "functionality" in this document: http://support.microsoft.com/kb/950263/ "New features and functionality" Cheers
socat - exec:'bash -li',pty,stderr,ctty - bash: no job control in this shell
What options should I use to get fully fledged shell as I get with ssh/sshd?
I want be able to connect the shell to everything socat can handle (socks5, udp, openssl), but also to have a nice shell which correctly interprets all keys, various Ctrl+C/Ctrl+Z and jobs control.
/* Requested tags: socat job-control */
I try gnome-shell in ubuntu by used gnome-shell --replace command
It work well but I think font size in the shell panel is too big.
Is possible to custom font size in gnome-shell panel?
Thank you.
How do I pipe a list of numbers straight from the shell into a command? For exampe something like this
[1,2,3,4] | sort
would give
1
2
3
4
EDIT:
In response to the answers kindly posted so far . . . I ask this, because I want to quickly test and debug a console application that takes many numbers as it input without having to type lots of individual values followed by carriage returns. I'd like to just type in the 'one liner' and hit the up arrow now and then to replay the command. Ideally, I'd like to do this without using a text file containing the values (which would obviously be the most simple way to do this.)
I'd like to have an hg hook that sends email using a gmail account. Obviously I don't want anyone to be able read the email-sending script except me or root, since it has a password in, so here's what I've tried:
-rwsr-xr-x 1 james james 58 Feb 18 12:05 incoming.email.sh
-rwx--x--x 1 james james 262 Feb 18 12:04 send-incoming-email.sh
where incoming.email.sh is the file executed as the hook:
#! /bin/bash
/path/to/send-incoming-email.sh
However, when I try to run as another user I get the error:
/bin/bash: /path/to/send-incoming-email.sh: Permission denied
The send-incoming-email.sh file works fine when I run as myself.
Is what I'm trying to do possible, or will setuid not propagate to commands executed from a shell script?
System is Ubuntu 10.04.2 LTS.
From the powershell prompt, when I try to run a program and feed it a command line option, powershell ends up mangling the option. Why does this happen? Is there any way to stop it besides enclosing the option in quotes?
For example, from the powershell prompt:
PS Microsoft.PowerShell.Core\FileSystem::\\mach\share .\myprog.exe -file=input.txt
myprog.exe ends up getting two arguments:
1) -file=input
2) .txt
I need to run it like:
.\myprog.exe "-file=input.txt"
or
.\myprog.exe '-file=input.txt'
to force it to be one argument. No other shell does this.
I am mostly using 'git-bash' which came with the Windows install of Git vcs. I think it is the same one that comes with Cygwin. It works fine technically but the UI sucks:
have to right-click the title bar and go to Properties to change the window width
most annoyingly... copy and paste and highlight with the mouse are equally cumbersome
In contrast, the Terminal app that comes with OS X manages these with aplomb and makes it so much more comfortable to work with. You can even drag and drop a file on it and it will paste the file path in at your cursor!
I have also tried:
http://sourceforge.net/projects/win-bash
http://www.steve.org.uk/Software/bash/
http://www.hamiltonlabs.com/cshell.htm
None of these do copy and paste of text without cumbersome right-clicking.
I am specifically looking for a Unix-flavoured shell in Windows so I don't have to use different shells between my home dev (Windows), the live server (Linux) or dev at the office (Mac).
Yes I have Googled and haven't found one yet...
I'm trying out Gnome Shell in 11.04. You can push the "activities" key to get into the overview where you can launch applications. I like the idea of the overview as an aid in switching focus, but it's too slow for just launching an application. Is Gnome Shell going to implement, or does it have, a way to launch applications (besides the alt-f2 command launcher) that is as quick as Gnome-do?
edit: To be clear, I'm aware of several Gnome application launchers. I'm curious about the Gnome Shell and any packages it includes (not add-ons like Gnome-do or Synapse).
first of all, I want to create shell script to start/stop downloads in torrent client. I don't need CLI but if you know how I can do that with CLI using shell script then it is okay.
I use jDownloader which is GUI based application but has some command line arguments as below which I use to start/stop download.
-h/--help Show this help message
-a/--add-link(s) Add links
-co/--add-container(s) Add containers
-d/--start-download Start download
-D/--stop-download Stop download
-H/--hide Don't open Linkgrabber when adding Links
-m/--minimize Minimize download window
-f/--focus Get jD to foreground/focus
-s/--show Show JAC prepared captchas
-t/--train Train a JAC method
-r/--reconnect Perform a Reconnect
-C/--captcha <filepath or url> <method> Get code from image using JAntiCaptcha
-p/--add-password(s) Add passwords
-n --new-instance Force new instance if another jD is running
So I can easily start/stop download as follows,
jdownloader --start-download
jdownloader --stop-download
now I want torrent client to do that through shell script.
After Upgrade from 11.10 to 12.04, the login process of Gnome 3 is extremely slow (It takes in the order of 60 seconds when it was in the order of a few seconds before the upgrade (Harddisk is a SSD!)).
Running "top" in a VT shows that gnome-shell is producing about 90% CPU load while dbus-daemon is taking roughly 10%. The moment when CPU-load of gnome-shell drops to normal levels (around 2-3%) corresponds to the time the login process is terminated and the desktop is displayed.
De-activating the four gnome-shell extensions (Alternative Status Menu, Quit Button, Remove Accessibility, system-monitor) that I have installed does not have any effect on session start up time.
Login to Gnome classic does not show the slow session start.
The system logs do not show anything suspicious. Thus, what is the best way to identify the underlying problem?
Hi all,
I am doing some improvements to an application in vs2008 in c++.
When i try to edit resources (for example add an entry in the string table), the vs2008 editor changes the rc file language from LANG_ENGLISH to LANG_NEUTRAL and a non english text is replaced with question marks.
If i edit the rc file externally (in notepad), and then load it to the vs2008 it works fine.
can anybody help me solve this?
thanks
Shimon
I'm trying to change the resolution on my base shell (the Ctrl+Alt+1) shell in Debian so that it supports my ViewSonic monitor.
The shell appears really fuzzy when it is displayed on my lcd monitor, but GRUB looks fine when it's displayed.
In I tried changing part of the GRUB_CMDLINE_LINUX_DEFAULT to 'vga=ask', and now I get the error on booting up
'Legacy 'ask' parameter no longer supported'
Has this 'vga=ask' value been changed to something else?
Note, I tried setting it to 'vga=782' after finding a list of screen modes here and the shell font got real huge for a few seconds during boot up, and then switched back to it's awful fuzzy self again, when I went to use the Debian Bash shell.
UPDATE
Tried suggestion in this question, it works without fuzziness until the last resolution change which displays the user login to the shell.
I recently ran up against a wall doing some bash shell programming where an associative array would have solved my problems. I googled about features of the Korn shell and learned that it supports associative arrays, so I installed Cygwin's pdksh (public domain korn shell).
However, when trying to create an associative array in the prescribed manner (typeset -A varName), I received the following errors, so I'm beginning to suspect pdksh does not support associative arrays.
./find_actions.ksh: line 2: typeset: -A: invalid option
typeset: usage: typeset [-afFirtx] [-p] name[=value] ...
Guess I'll be considering Perl instead, but I really wanted a good excuse to learn a dialect/language new to me
I have a C shell script that calls two
C programs - one after the another
with some file handling before,
in-between and afterwards.
Now, as such I have three different files - one C shell script and 2 .c files.
I need to give this script to other users. The problem is that I have to distribute three files - which the users must keep in the same folder and then execute the script.
Is there some better way to do this?
[I know I can make one C code file out of those two... but I will still be left with a shell script and a C code. Actually, the two C codes do entirely different things... so I want them to be separate]
I have a C shell script that calls two
C programs - one after the another
with some file handling before,
in-between and afterwards.
Now, as such I have three different files - one C shell script and 2 .c files.
I need to give this script to other users. The problem is that I have to distribute three files - which the users must keep in the same folder and then execute the script.
Is there some better way to do this?
[I know I can make one C code file out of those two... but I will still be left with a shell script and a C code. Actually, the two C codes do entirely different things... so I want them to be separate]
I want to concatenate two strings for the shell file im getting error when i have created the shell file in following manner could you please suggest how to get it set
export APP_HOME="/home/sfptladmin/ArchivalDaemon"
export JAVA_HOME="/usr/lib/jvm/java-7-oracle/jre"
export LIBPATH="/home/sfptladmin/ArchivalDaemon/lib"
export CPATH=$APP_HOME/conf
export CPATH=$CPATH:$LIBPATH/commons-beanutils-core-1.7.0.jar
export CPATH=$CPATH:$LIBPATH/commons-collections-3.2.jar
export CPATH=$CPATH:$LIBPATH/commons-io-1.4.jar
export CPATH=$CPATH:$LIBPATH/commons-lang.jar
export CPATH=$CPATH:$LIBPATH/commons-net.jar
export CPATH=$CPATH:$LIBPATH/dataloader-27.0.1-uber.jar
export CPATH=$CPATH:$LIBPATH/dom4j-1.6.1.jar
export CPATH=$CPATH:$LIBPATH/log4j-1.2.15.jar
export CPATH=$CPATH:$LIBPATH/opencsv2.3.jar
export CPATH=$CPATH:$LIBPATH/poi-3.7.jar
export CPATH=$CPATH:$LIBPATH/poi-ooxml-3.7.jar
export CPATH=$CPATH:$LIBPATH/poi-ooxml-schemas-3.7.jar
export CPATH=$CPATH:$LIBPATH/wsc-23-min.jar
export CPATH=$CPATH:$LIBPATH/xmlbeans-2.5.0.jar
export CPATH=$CPATH:$LIBPATH/archival-daemon-main.jar
export CPATH=$CPATH:$LIBPATH/sbmclasspath.jar
export CPATH=$CPATH
java -Xms256m -Xmx512m -classpath $CPATH "-Dfile.encoding=UTF-8" com.genpact.proflow.daemon.archival.manager.ArchivalManager
echo $CPATH
I'm working my way through William Shotts Jr.'s great The Linux Command Line on my Mac OSX 10.7.5 system. 90% of the linux that Shotts covers is close enough to Darwin that I can figure out or GTEM to figure out what's going on. I've made it to chapter 27 on "Writing Shell Scripts" and am getting hung up creating "here files" within a function.
I get an syntax error: unexpected end of file error when I include the following function:
report_uptime () {
cat <<- _EOF_
<H2>System Uptime</H2>
<PRE>$(uptime)</PRE>
_EOF_
return
}
The error goes away if I use the following function placeholder:
report_uptime () {
return
}
Also, elsewhere in the script, outside of a function I use the cat << _EOF_ format to create a "here file" with no trouble:
cat << _EOF_
<HTML>
<HEAD>
<TITLE>$TITLE</TITLE>
</HEAD>
<BODY>
<H1>$TITLE</H1>
<P>$TIME_STAMP</P>
$(report_uptime)
$(report_disk_space)
$(report_home_space)
</BODY>
</HTML>
_EOF_
If anyone has any idea what I'm doing wrong I would be grateful!
Any time I try to start up my computer it goes to a screen titled GNU GRUB version 1.99-12ubuntu5
I can then choose from 5 different options. If I try to just boot Ubuntu, with Linux 3.0.0-20-generic it then goes to a screen saying:
mountall: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.14' not found (required by /lib/libply.so.2)
General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
root@Brown126:~#
Control-D just brings me back to the first screen. And nothing works in recovery mode. How can I fix this?