Programming :: Cut Command Wont Work?

Mar 3, 2010

on linux command promt cut command work.but the same command gives empty output in linus shell?F1=$(echo $line | cut -s -f26) NOT working in shellcat file | cut -s -f26 work!

View 3 Replies


ADVERTISEMENT

Programming :: Use The Seq Command But Can't Get It To Work?

Mar 24, 2011

I have a script that will build a list of hosts and it works fine Code: for ((i=$START; i<=$END; i++)); do echo "$NAME$i"; done But I need it to build the START and END on different number formats (i.e. 1 -> 10, 01->10, 001 ->010)

I am trying to use the seq command but can't get it to work quite right with the -w flag in the following Code: for ((myseq=$START; myseq<=$END; myseq ++)) do echo "$NAME${myseq}" done I am fully aware that this syntax is probably wrong, and need to know how to correct it.

View 1 Replies View Related

Programming :: Command Line Works - Won't Work From Inside Bash Script

Feb 16, 2011

Writing script to create backup of file by adding datetime to file name. Basically test for file presence if there, cp with datetime then rm original cp works fine from command line but get cannot stat `full path to file': No such file or directory

Code:

Here are the errors: cp: cannot stat `~/html/CVP_dadamail/.dada_files/.logs/errors.txt': No such file or directory rm: cannot remove `...': No such file or directory

The for statement is a placeholder as I have same file to backup out of several directories. using "bash -x scriptname" -OR- inserting echos, I can see I've constructed the strings properly. Believing it might be related to the hidden directories, I tried setting the shopt "glob" options to no avail.

Ultimately I'll add the other directories to the for loop and then run this from a cron job, so if you see potential pitfalls knowing I'm headed in that direction...believe construct would be

Code:

View 4 Replies View Related

Programming :: Effect Of Using Eval To Execute A Command As Opposed To Writing It On The Command-line?

Jun 18, 2010

Code: cmd='date | wc'

$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?

View 4 Replies View Related

Programming :: Command Line Invocation Of Gnome-terminal To Run More Than One Command?

Feb 16, 2010

I am trying to learn how to pass more than a one-command startup for gnome-terminal.

I will give an example of what I'm trying to do here:

Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
${0##*/} [-x] [-g]
code....

However, running with the -g option to invoke gnome-terminal, I get a "There was an error creating the child process for this terminal" error.

This same error occurs if the gnome-terminal line is changed to

Code:
gnome-terminal -e mcTerm

Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.

View 4 Replies View Related

Programming :: System Command / 'mcc' Is Not A Recognised As An Internal Or External Command?

Apr 13, 2010

I am writing a perl script which uses the matlab compiler to compile a .m file.

I am using the system("mcc �m file.m"). I have matlab installed and both script and exe are in the same drive.But i get the following error .

'mcc' is not a recognised as an internal or external command ,operable in program or batch file.

View 5 Replies View Related

Programming :: Show The Output Of Shell Command Into A Textbox, Ex Ps -efc Command?

Oct 20, 2010

I am using gtk to program GUI. How can I show the output of shell command into a textbox, ex ps -efc command ?

View 3 Replies View Related

Programming :: Convert This Awk Command From Command Line Into An Awk Script ?

Oct 15, 2010

I'm trying to convert this awk command from command line into an awk script, but just cannot get it to work:

This is what i have after my BEGIN

Am i missing something here? this just prints out the count for everyline, not counting lines on 5th field that match 'A'

View 1 Replies View Related

Programming :: Calling Command From History Using Variable Like !$command?

Nov 19, 2008

suppose i store the history number of a command say :

1004 cat file

Then now i want to run it like : !1004 but by using a variable.

command=1004
!$command

i am getting errors like :

command=1004command

View 2 Replies View Related

Programming :: Bash Ambiguous Redirect - Redirect One Command Output Which Will Be Treat As A Content Of File For Another Command?

Mar 9, 2011

I am trying to grep multiple numbers from file, grep does have the -f option for that.

Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with

Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?

View 2 Replies View Related

OpenSUSE :: The RUN Command Does Not Work?

Feb 21, 2010

Picasa Web Albums - Sri - Linux

when i hit alt+F2 the run dialogue opens up but i am unable to type anything there.you can see the screenshots of those in that link.any packages to reinstall??
i am using kde 4.3.1 (KDE 4.3.1) "release 6" on opensuse11.2 64 bit.i have used this before with no problem.i recently formated my system and i am getting this since then

View 4 Replies View Related

Slackware :: 'su -' Command Did Not Work

Jul 14, 2010

I just logged in to my remote shell account like I always do: as an ordinary user, because root login is disabled in sshd. Then I may want to become root with the 'su -' command.

But the 'su -' command did not work today. Every time I tried, I got this laconic message: "Sorry."

Note that I wasn't even given a chance to enter the password. Just 'su -', Return, "Sorry."

I logged in to the service host control panel and rebooted the system. I can su - and be root again.

Fine, but... What happened?!! I searched Google and only found reports of people who at least were given the chance to enter the password.

View 8 Replies View Related

Fedora Installation :: Yum Command Does Not Work?

Jul 13, 2010

Yum command does not work, I tried to install apache2, mysql-server, php5 and gave the following error:

Code:
yum: line 1: fg: no job control
yum: line 2: syntax error near unexpected token `ImageMagick'
yum: line 2: `%%Creator: (ImageMagick)'

View 14 Replies View Related

General :: Does The SVN Command Work In One Directory But Not Another?

Jun 10, 2011

I used SVN to check out the code of an open source project. When I typed the following command:

[user1@smallfox]~/workspace/project1% svn co http://svn.apache.org/repos/asf/mahout/trunk

It worked just fine. However, when I typed the SVN command in the root directory, it did not work and gave me an error message:

[user1@smallfox]~% svn co http://svn.apache.org/repos/asf/mahout/trunk
zsh: command not found: svn

View 1 Replies View Related

Ubuntu :: Beep Command Does Not Work?

Jan 25, 2010

My beep command stopped working -- it does not beep. I think this happened when I upgraded to Karmic (but could have been earlier). I use the beep command to notify me of important events.

I tried looking in sound settings, and did not find anything suspicious. I also tried googling but most stuff just describes how to "disable the annoying beep". Lastly, I tried different software channels and repositories to find an alternative program to the beep command, but nothing happened.

View 8 Replies View Related

General :: Apt-Get Install Command Does Not Work

Aug 11, 2010

I use the 10.04 ubuntu, somehow I did something and now the apt-get install command doesn't work. No matter what package I try to download, there's always a "couldn't download all packages run update or --fix...." message. When I scroll up I see that it downloaded some packages but it couldn't find them all. So I thought that I should try a different server. I googled it and found that the server's address is stored in /etc/apt/sources.list. I edited that file and replaced all the deb and deb-src lines with the server's address. I saved that but when I tried to download something (like vlc) I got a "E: Couldn't find package vlc" message. I also tried many different server's but there was no difference. Am I doing it wrong? Should I run a command after editing the /etc/apt/sources. list file? Or didn't I edited the file right?

View 4 Replies View Related

Ubuntu :: Su Command Won't Work, But Sudo Will?

Oct 16, 2010

I was attempting to install the fglrx driver on my new ubuntu insallation, following a guide I found from google. At one point it says I need to login as super user, so I tried and no matter how many times I try it just keeps saying authentication failed. I even tried typing in my password with 1 finger, multiple times, every single time, authentication failed. So I decided to try the sudo command with fdisk -l, worked flawlessly. Tried the su command again, authentication failed, I have no idea what in heck is causing this but it just won't stop happening.

View 1 Replies View Related

General :: Exclude Does Not Work With Tar Command

Jul 6, 2011

I don't know why --exclude doesn't work when I use tar command. Please see this code
Code:
mahmood@pc:~$ l a/
1.txt 2.txt 3.txt b/
mahmood@pc:~$ tar cvjf compressed.tar.bz2 --exclude=/home/mahmood/a/b/ a/
a/
a/2.txt
a/1.txt
a/3.txt
a/b/
mahmood@pc:~$
As you can see although I excluded b/ but tar command ignored that.

View 2 Replies View Related

General :: Running This Command, And Seems Not To Work?

Jun 3, 2011

I'm running this command, and seems not to work, following the command:Quote:for nic in `ls /sys/class/net | grep -v lo`; do echo ${nic}; udevinfo -a -p /class/net/{nic} | grep -i address; doneThe output is the following:Quote:eth0eth1But the output should show something like this: (showing the MAC address)uote:

View 6 Replies View Related

General :: Unable To Get The Ls Command To Work Exactly

Jun 15, 2011

I am have trouble getting the ls command to work exactly how I want, for example, sometimes I want to list the contents of a directory into a text file by command:

Code:
ls directory > list.txt

(assume the only objects the directory contains are files with extension .dat eg file1.dat, file2.dat, ...)sometimes I want the relative path of the files prepended to them in my text file eg:

path/file1.dat
path/file2.dat
path/file3.dat

[Code].....

It feels like ls is unpredictable in this regard - sometimes it prepends the path and sometimes it doesn't and sometimes it adds both entries (with and without the path prepended into the text file)....How can better control the way ls works?

View 2 Replies View Related

Debian :: Time -f Don't Work / Command Not Found?

Mar 3, 2010

I use lenny but when I use the example

time -f "%E real,%U user,%S sys" ls -Fs
-bash: -f: command not found

real    0m0.002s
user    0m0.000s
sys     0m0.000s

Is this a bug or what is wrong use the example from "man time"

View 3 Replies View Related

OpenSUSE :: Command Doesn´t Work Anymore On 11.4?

May 23, 2011

have You noticed that mt command doesn´t work anymore on 11.4? We try to install new version to hadle robotic library, but someone has written mt command as a new, and it doesn´t accept mt -f command anymore. cpio based mt command it´s not reliable as old one. Can anyone tell where to get old mt command which is compatrible new 11.4 x64 bit version?

View 9 Replies View Related

Ubuntu :: Can't Get Command To Install Gnome To Work?

Jan 16, 2010

I accidentally removed gnome-desktop when I removed PuleAudio. When I boot, I log in and I am stuck at the CLI. However, I can't get any command to install Gnome to work, including sudo apt-get install gnome-desktop or sudo apt-get install gnome. I forget what the error messages were.

View 1 Replies View Related

Ubuntu :: Why Doesnt This Bash Command Work?

Apr 8, 2010

cd /Desktop/ ??

I can change to just about any dir of my file system with cd /filename/

eg cd /var/ or cd /opt/

it will skip me up or down the tree to get there but when if go cd /Desktop/or cd /myuseraccount/

is get: bash: cd: /Desktop/: No such file or directory

i have to be right next to the directory to get there.i dont get it. why is this?

View 6 Replies View Related

Ubuntu :: Can't Get Change Directory Command To Work

Jul 3, 2011

Basically, I'm in the terminal and I type in:cd desktop (or downloads or whatever)and nothing happens. I'm probably just being legendarily thick, but where am I going wrong?

View 9 Replies View Related

General :: Can't Get Mail Command (or Equivalent) To Work

Feb 19, 2011

I am teaching using an Ubuntu 10 server. The course stipulates the students use the mail command to send me assessment work, however I can't get mail to work (I did have to install it in the first place). After I end the message with a dot I get the message "send-mail: cannot open mail:25".

View 7 Replies View Related

General :: -cd Command Of Urxvt Doesn't Work

Aug 13, 2010

-cd command of urxvt doesn't work

View 1 Replies View Related

General :: Locate Command - Unable To Work

Oct 5, 2010

Code:

nnjond@nnjond-den:/$ cd /media/disk/Dual_Data/
nnjond@nnjond-den:/media/disk/Dual_Data$ ls
07_Magna_DOWNLOADS 21_TEMPS Peleas.htm
08_Self-Improvement 22_Desktop Pelleas.odt

[code]....

View 6 Replies View Related

General :: Setup Command Not Work In RHEL 5.4?

Sep 26, 2010

i am using rhel 5.4..today i type the command setup! is not workERRor: error while loading shared libraries: libslang.so.2: cannot open shared object file: No such file or directory

View 5 Replies View Related

General :: Sudo Command Doesn't Work

Oct 17, 2010

I want to install some software using sudo apt-get command,but it dosen't work.(my network works well) how to handle it? below is the output of terminal:

@ubuntu:~/Downloads$ sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4
Reading package lists... Done
Building dependency tree

[Code].....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved