Programming :: Access Command Line Variables From Awk?
Feb 11, 2010
I am taking an argument from the command prompt for my shell script ie $1 and i need to use $1 in my awk part of the script.But it actually doesn't get any value when used in awk. accessing this command line argument in awk?
View 5 Replies
ADVERTISEMENT
Jul 2, 2010
Anyone else using the Mill Hill & Canterbury (MHC) Modula-2 to Java compiler?
[URL]
I cannot access the command line options and the environment variables.
View 2 Replies
View Related
Feb 13, 2011
I want to access a file, and check the length of every line.After, i want to check and replace all lines with length over 10 characters, with a message.Does anyone have a clue on that?
View 1 Replies
View Related
Aug 18, 2010
i am trying to write scripts to pass 2 different variables to find command.
find . -name $var1 -exec grep -H $var2
find . -name CDR_2010-07-21 -exec grep -H 9892614477 {} ;
1st variable CDR_2010-07-21(passed by var1) is the file name inside which i am trying to search string 9892614477(passed by var2). i have tried following script
[code]...
View 9 Replies
View Related
Apr 30, 2011
I installed the Berkeley DB on the Ubuntu server and tried to access the dbxml from the command line and it returns command not found
path/to/dir/dbxml-2.5.16/install/bin$dbxml
-bash" dbxml: command not found
Can someone point me in the right direction
View 1 Replies
View Related
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
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
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
Dec 18, 2009
with that said i burned fedora 8, 10, and 11 checked the sha1 verified everything was fine i had originally installed fedora 8 on an old pc i had from windows XP without any problems messed with it some, upgraded to 10 again no problems. tired to update 11 got a message about ext3 not found ext4 not found, re installed 10 the loader loads up now i have a blank screen with a cursor it the left hand corner
again i had 10 installed fine prior to all this can any one point me in the right direction to solve this issue or am i way over my head trying to figure this stuff out. i have spent 3 days searching these forums.
i'm just not quite sure what i need to do. oh, i tried to install 8 again and it wouldn't take either. i think the 10 problem has something to do with the graphic driver it's a geforce 7400 nvidia and something to do with the grub, but like i said i get a blinking cursor and not quite sure how to access the grub or command line.
View 3 Replies
View Related
Aug 18, 2010
I cannot connect to the internet on the command line. Things like firefox or chrome browser work fine. But on the command line programs like 'links' fail to work. This is on a machine behind a proxy, I have the http_proxy and https_proxy environment variables set properly.
View 5 Replies
View Related
Apr 16, 2011
my fedora 14 did an automatic update tonight and on reboot it hangs displaying the "f" before the login in menu. The "f" is how I now feel.I do "fn+f2" as it is booting and it displays the sequence of loading items which report all is "ok" until it gets to "jexec services" and then it hangs.I do not know how to access the machine in command line mode and I am not sure what to do from here. I beleive the "jexec service" is a Sun Java item but I am not sure.
View 2 Replies
View Related
Mar 17, 2011
How do I access files with spaces from the command line?
for example I want to go to a file called "New File" and let's say is in Downloads/Books/(and here is the file)
how do I input the space since the command line doesn't recognize it?
View 2 Replies
View Related
Jun 14, 2011
I have Red Hat 5.4, and I'm trying to log in using tty1 by pressing Ctrl-Shift-F1. I get to the text login screen, my banner displays, but when I try to log in as root, the banner just displays again and it asks me to log in.
It does not say that my password is incorrect, just asks me log in as if the previous exchange never happened. I have added tty1 to /etc/securetty, and all the other tty's and vc/1, vc/2, etc...in an attempt to get something to work. I recently started using PAM for password authentication, and the pam_securetty.so line is set correctly in /etc/pam.d/login. Any idea why I can't log in? Did I miss something I have to add?
View 1 Replies
View Related
Sep 5, 2010
just learning qemu. Been able to figure out everything fine, except one thing: what do I need to add to my qemu command-line to give my VM access to the Internet?
I read online docs, but to be honest, the VLAN/TAP stuff they describe doesn't make much sense to me.
View 2 Replies
View Related
Aug 5, 2011
Is there any way to install a Ubuntu server and access the server remotely via a Ubuntu desktop environment instead of a SSH command line?
I will be installing a Ubuntu server in an office where the office manager will need to be able to do simple things like add/remove users, access filesystems, etc. She can handle these tasks in Ubuntu desktop/GUI, but it is impractical for her to have to learn how to use the CLI terminal to do this stuff.
Will I have to install desktop Ubuntu on the server to do this, or can I install Ubuntu server version and setup another computer Ubuntu desktop to remotely login graphically?
View 1 Replies
View Related
Sep 15, 2010
Does anyone know from experience a good gdb tutorial, so I can learn to use it from the command line.
View 2 Replies
View Related
May 23, 2010
I'm building a script for my place of employment. The next step in it is checking what the user input was. Determining if they added a part in there or not. The script prompts for a hostname. Hostnames are localhost.localdomain. Now, I want the script to check to see if they put localdomain and if they did, not to add the domain to the /etc/sysconfig/network, but just what they entered. So say the user inputs:
[Code]....
View 4 Replies
View Related
Jun 8, 2010
I need to write a script that will take 1 command line argument. The argument will be a username. The script will determine if the user exists on the system and will print an error if it does not. If the user does exist it will determine if the user is currently logged in, if the user is not logged in it will determine the last time the user logged in and display the file in the users home directory that was most recently modified.
View 2 Replies
View Related
Oct 11, 2010
i was wondering if someone could help me figure out a script for global variables i'm trying to set for a group of command line arguments:
basically i'm trying to set: if $# = 3 then i want to search for each all string $1 $2 $3
if $# = 4
then i want to search for each all string $1 $2 $3 $4
View 2 Replies
View Related
Jan 25, 2011
I try to write script and echo two command at the same line .
echo "A"
echo "B"
How can I pipe above two command at the same line in text file . So, in the output text file , you can see below ? Code: A B not Code: A B
View 4 Replies
View Related
Mar 4, 2011
I am using an awk command to print a line from a cvs file.the awk command includes an if statement that filter the output-lets say i want to print all the lines that the price field is greater than 30.i have it working when i put the parameters myself.. but when i try to send them with vars it wont work..i am sending the sign of the if statement - can only be: == , < , >it looks like this:
cat file.csv | awk -v sign=">" -v field="2000" '{if($3 sign field) printf "%-12s%-12s%-12s%-12s
",$1,$2,$3,$4}' FS=,
the bold part is the problem , because when i put the sign parameter myself t works great.. i guess its a chars issue but i cant spot it
View 3 Replies
View Related
Feb 7, 2010
I am wanting to write a program that runs a program or command-line. Is there are way of making a program that activates a command-line (for example executing 'ps -a -f' or '/home/shared/fah').
In addition to that, I want the program to do a 'ps -a -f' and put the results in a buff, how could I do this.
View 5 Replies
View Related
Jan 31, 2011
First step will obviously be to compile the QT project with -g option, but how to do that through command line?
View 6 Replies
View Related
Jul 14, 2010
I'm troubleshooting a batch of scripts I'm modifying, including an IDL script called by a .csh script. the IDL scripts were provided to me by a coworker and my .csh script is intended to automate a lengthy set of extremely tedious and time consuming processing tasks.
I am currently in the process of debugging, and can't get the IDL to print any messages other than critical failures to the screen. Is there any easy way to redirect the stdout to either a logfile or the screen?
View 2 Replies
View Related
Jun 10, 2010
I've got the "OpenCryptoKi" project source from "sourceforge.net" at here:But I don't know how should I compile and build it by "GCC" or "Make"?!I have ubuntu 9.04 and I've set the linux runlevel at 3, but I'm not so familiar with compiling such project at commandline environment of linux
View 6 Replies
View Related
Jan 23, 2009
I just want to see how the command line such as : "cat", "split", "ls"...ect source code ? Are they written in C or other language ? I don't know where to search those?
View 6 Replies
View Related
Feb 1, 2010
I want to know how to get eg. the contents of a form on a webpage which has been passed to a server side PHP script, inside for example an array which I can read. I've been reading a ebook on PHP which as far as I can see doesn't cover this inside it.
View 1 Replies
View Related
May 29, 2010
i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?
View 5 Replies
View Related
Jan 26, 2015
I'm trying to automate two command lines, a synclient and a syndaemon. They both work well if I type them manually in a terminal, but if I do a littre script to do this, tap to click and scrolling don't work anymore.
This is the script I wrote:
Code: Select all#!/bin/bash
synclient VertEdgeScroll=1
syndaemon -d -t -K
exit 0
So I made a chmod +x on the file, placed it in ~/bin then change PATH to include the directory. Then I added this file in "Startup applications".
The scripts run ok, mais it has a different effect than if I run the commands manually.
View 10 Replies
View Related
Aug 10, 2010
I trying to extract via command line the latitude and longitude with this command Code: curl -s [URL]
View 4 Replies
View Related