Software :: Read Command Not Executed In Script
Nov 2, 2010I have a read command in the following script, but it does not get executed when I run the script. What's wrong with the read statement?
View 3 RepliesI have a read command in the following script, but it does not get executed when I run the script. What's wrong with the read statement?
View 3 RepliesI want to be able to use Ctrl+R to have reverse-i search. Also if I press Shift+Up Arrow after typing the first few characters of a recently executed command then the shell should complete the command by finding the most recent commmand having the same first few characters.
View 1 Replies View RelatedWhen I run the following command from my macbook to my ubuntu server the terminal does not get released. It just sits there until I Control-C the command.
Code:
ssh user@my-server 'sudo /etc/init.d/nginx start'
When i login and then run the command everything works fine.
Code:
ssh user@my-server
sudo /etc/init.d/nginx start
[Code]....
Currently we are using Unix machine & the activity are logged in the file using following code used in profile
.profile code
# /ln/aud_root/dds_ibm/.profile
trap 'print "not allowed"' INT
trap 'print "not allowed"' QUIT
trap 'print "not allowed"' TSTP
[Code].....
what is the tool to get the history inclduing the user name,command time and from which file/folder the command is executed.
View 1 Replies View RelatedI want to use PROMPT_COMMAND variable to build a history of all the commands i execute. So Basically i want to append the last executed command to my own command log file. How can i find the last executed command ?
I want to add PROMPT_COMMAND="echo $last_executed_command >> my_command_log" But I am not sure how to find the last executed command
Inspite of having 755 permissions on the chown command, it seems the command can be executed by the root only. I was under the impression that the 'x' permission for 'others' can give executable rights to the normal user too, which does not seem to be the case here. Just curious to know, if not the file perms itself, what controls the execution of the command?
View 6 Replies View RelatedHere is my script for at command. The intention is to get itself executed every minute.
Code:
logfile=/tmp/attest.log
loginterval=1
[code]....
I am working on Ubuntu 9.10.Since last two days there is issue while working with Terminal.Whenever I type a command and press enter it doesnt do anything. command is not executed. I guess its in loop. when I press Ctrl+C then it comes out of loop. this happens with all commands and I am not sure what is the problem.I have reinstalled Terminal but it did not worked.
View 8 Replies View RelatedI have one distro installed, LILO as the boot loader, and i wonder if it's possible to duplicate the lilo entries with an option which executes some script or command during, or after the boot.Actually, i installed a Slackware + autolaunching virtual machine, but i have two VM, so i need to autolaunch one of them. May i choose it from the very beginning ?
View 9 Replies View RelatedI wrote a simple script to see if firefox is running. However, the ps command is not executed, when I open the logfile I see: "DEBUG LINE 4" and not DEBUG LINE 5, so "ps -e" is never executed despite using the full path of the ps command.
Here is my script:
#!/bin/bash -l
# simple script to test if firefox is running...
PS=/usr/bin/ps echo "DEBUG $LINENO"
$PS -e | fgrep firefox echo "DEBUG LINE $LINENO"
logging in a server through putty in the same network when i executed last command its showing system ip logged in time and logged out time the output as followsthis is my system
oot pts1 xx.xx.xx day month date time in time out timeand similarly am geeting other than this likeroot :0day month date time still logged in this is from more than 3 days its logged in
know the basic command for reading the README file after you tar the program using terminal Ubuntu 11.04.thx
View 2 Replies View RelatedI am writing a short script to do some backups.Here is a small section of it:
Code:
echo -n "Please enter your choice ..."
read CHOICE
[code]....
What is the equivalent of read -r (solaris command ) in Linux ? read utility in solaris will read a single line from standard input and -r option is used not to treat backslash () as an escape character .
View 4 Replies View RelatedI need to create backup of internal drive and write it on DVD. I want to do this in single command...like below: ntfsclone -f --save-image --overwrite - /dev/sda1 | growisofs -Z /dev/sr1=/dev/stdin
in above command, i tried to to create backup of first partition of internal drive and need to write this backup on DVD. But above command has some probolem due to which it could not write backup on DVD....and how to read from standard input in 'growisofs' command?
I am trying to find a linux cmd line utility that will read info from an iso file. The problem I have is that the file is always corrupt so I cannot mount it because I only have around 100k of it but all I need is to extract the headers of what the iso contains. how I can achieve this I have searched the internet with no look at all.
View 1 Replies View Relatedhow can I set the cat command to read specified lines of a text file,like if I have a text file with 100 lines, who can I say cat only line 23 to 42?
View 3 Replies View RelatedI have an assignment where I have to use an expr command to read values from File1.txt and File2.txtHeres the assignment:Create two files.File1 has one line with the value of 5.ile2 has one line with the value of 100.Edit your new file using Gedit or VI and change it so it performs the following actions:Read the values from the files above (file1 and file2)Divide the value from file2 by the value in file1.utput the result of this calculation to a new file called file3. My .scr file is week3prog3_george, in file1 I put var1=5, file2 is var1=20.Then, I put in my .scr file this:
#!/bin/bash
expr File2.txt / File1.txt
It returns an error message stating "non-integer argument."And...how do you point the .scr file to read values from two different files, and the book my school has provided does not contain the info I need.
I know there's a command to display the live amounts of data being written and read to the disk.Like, it tells you how many blocks have been read/written so far to a device
View 1 Replies View RelatedI'm trying to create a separate thread for my program which basically polls using the read command. However this new thread seems to block the main thread, anyone know why this could happen.
In main I call this function pthread_create(&mainEventThread, NULL, GenericEventThread, NULL);
which calls
/*New threads start function */
void *GenericEventThread()
{
short int i, nError = -1;
[Code]...
I've used pthread_self to check that a new thread is being created, so why is the while loop in one thread blocking the main thread from running, I haven't used the join function anywhere in my code.
Trying to create a small script that will read user's input, test if user entered some input and if not display some message or display a text using user's input.
The script is the following but i get an error saying "[: 6: =: argument expected"
I have a netbook with a 150GB hard drive in it. A while ago I dropped my netbook and it wouldn't boot. Had a "failed command: READ FPDMA QUEUED" error at startup. So naturally I went and reinstalled. Reinstalling worked fine and I had my computer back. What I didn't account for was the fact that anytime it lost power and didn't shut down properly, I'd get the same error. I can't seem to recover my data either. Can't get any live disks to mount the hard drive after this error but for some reason I can still reinstall Crunchbang (essentially debian). Now I know there are bad sectors or something because when I try to use the disk that came with the netbook with an image of Windows XP that writes to the entire hard drive it throws an error but linux will avoid this I suppose when installing.
Now all of this is to say, being a laptop, several times I have left it on overnight when I fall asleep working or have to run into to town and it'll die and then I lose all my data, rather irritating. What's causing this error? What can I do to prevent it besides getting a new hard drive? If I can't prevent it from happening in the future is there a way to recover the data off the hard drive? Here's the section of the boot log that contains the error: [url]
I need to add -audit to the process /usr/bin/Xorg :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-MTmpH6/database -nolisten tcp vt1
And have added -audit to the line in /etc/X11/xdm/Xservers but with no luck. I can't seem to find where this thing is getting launched from!
i have install php and make proper confgiuration as said in various books and forums.but |all what i gotis just blankpage which means it knows that thereis the file at given folder but it cannotexecute.
View 1 Replies View RelatedI have a script scheduled to run with Crontab at 5am each weekday.The script is all good and executes manually (is just a simple stop/start of a service)I have reason to believe that it is not executing according to schedule.I am looking to see when a script was last executed.The script is executing accordingly (long story short, I forgot it was Tuesday). I would still like to know how to check a last-execution time.
View 1 Replies View RelatedHow can I find out which script runs and automatically mounts any usb drive inserted? This script seems to be faulty because it fails on ext3 disks but functions fine on NTFS or HFS+ disks. If I can find out which script it is maybe someone can help me fix it?
View 14 Replies View RelatedI'm using debian jessie and I use lightdm..and I created a script in "/etc/X11/Xsession.d/canberra", with this contents:
Code: Select allif [ -z "$GTK_PATH" ] ; then
GTK_PATH="/usr/lib/gtk-2.0"
else
GTK_PATH="$GTK_PATH:/usr/lib/gtk-2.0"
fi
[URL] ......
Login to my user account the variable "$GTK_MODULES" is empty....
I usually set the transfer rate for wlan on start up because I dunno any other way of doing it. I find it weird that every other ubuntu versions can do rc.local at startup, even 9.10 xubuntu, but it didn't work for ubuntu.
how can I get the computer to run the script on startup? I tried to google for the problem but I only seen people mentioning the problem not the solution.
I have this script that I want to be run on startup:
Code:
#!/bin/bash
#chkconfig: 5 80 20
[code]....