Search Results

Search found 66 results on 3 pages for 'csh'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • grep options (unix)

    - by lego69
    hello everyone, can You explain please, can grep pick rows if at least one element from the list appeared, for exmaple grep "hello world" file1 grep must give me all rows which have or word hello or world or both of them, thanks in advance

    Read the article

  • error in script

    - by lego69
    can somebody please help, I'm working with C-Shell, I'm trying to run this script set callsTo = "`cut -d" " -f2 ${1}`" echo $callsTo cut receives data from the file which is the first parameter > ./myscript data I need only second field from every row -f2 after that I want to check if the data was stored, but I receive or an error unmatched `. or empty row, what is wrong with my script, thanks in advance for any help

    Read the article

  • reading from file

    - by lego69
    can somebody help me, how can I filter my file, inside the file I have rows with 3, 4, 5 elements, I want print using echo only these which have 5 elements, thanks in advance (I'm talkin about scripts)

    Read the article

  • problem with script

    - by lego69
    I'm workin on C-Shell, can somebody help me find the bug, my script: #! /bin/tcsh -f cut -d" " -f2 ${1} | ./rankHelper script rankHelper: #! /bin/tcsh -f set line = ($<) while(${#line} != 0) cat $line set line = ($<) end file lines from which the data was sent: 053-3787837 038280083 052-3436363 012345678 053-3232287 038280083 054-3923898 033333333 052-2222333 012345678 052-1111111 012390387 I run it using: > ./rank lines why do I receive only one number 038280083 I thought cut must cut 2 field from all rows... thanks in advance for any help I expect to see second field from all rows from lines

    Read the article

  • from string to integer (scripts)

    - by lego69
    I have this snippet of the code: set calls = `cut -d" " -f2 ${2} | grep -c "$numbers"` set messages = `cut -d" " -f2 ${3} | grep -c "$numbers"` @ popularity = (calls * 3) + messages and error @ expression syntax what does it mean? grep -c returns number, am I wrong, thanks in advance in $numbers I have list of numbers, 2 and 3 parameters also contain numbers

    Read the article

  • How to write scripts that can run in bash and csh?

    - by Victor Liu
    I'm not sure if this is even possible, but is there a way to write shell scripts that can be interpreted by both the Bourne shell as well as C shell? I want to avoid simply checking for the shell and running a shell-specific code. If this is possible, are there any guides on how to do it? I have always written my scripts for Bourne shell syntax, and I know next to nothing about csh, so this may be a stupid question. I have Google'd for the differences between shells, but there is little information (as far as I can tell) on its implications for scripting.

    Read the article

  • problem with python script

    - by hidayat
    I want to run a csh file from a python scrip, example, #!/usr/bin/python import os os.system("source path/to/file.csh") and I want this file to run in the same shell as I am running the python script, because the file.csh script is settings some environment variables that I need. Does anyone know how to do this in Python?

    Read the article

  • MS SQL Query Sum of subquery

    - by San
    Hello , I need a help i getting following output from the query . SELECT ARG_CONSUMER, cast(ARG_TOTALAMT as float)/100 AS 'Total', (SELECT SUM(cast(DAMT as float))/100 FROM DEBT WHERE DDATE >= ARG.ARG_ORIGDATE AND DDATE <= ARG.ARG_LASTPAYDATE AND DTYPE IN ('CSH','CNTP','DDR','NBP') AND DCONSUMER = ARG.ARG_CONSUMER ) AS 'Paid' FROM ARGMASTER ARG WHERE ARG_STATUS = '1' Current output is a list of all records... But what i want to achieve here is count of arg consumers Total of ARG_TOTALAMT total of that subquery PAID difference between PAID & Total amount. I am able to achieve first two i.e. count of consumers & total of ARG _ TOTALAMT... but i am confused about sum of of ...i.e. sum (SELECT SUM(cast(DAMT as float))/100 FROM DEBT WHERE DDATE >= ARG.ARG_ORIGDATE AND DDATE <= ARG.ARG_LASTPAYDATE AND DTYPE IN ('CSH','CNTP','DDR','NBP') AND DCONSUMER = ARG.ARG_CONSUMER) AS 'Paid' Please advice

    Read the article

  • Adding marker to the retrieved location

    - by Rahul Varma
    I have displayed the map in my app by using the following code. I have retrieved info from the database and displayed the map. Now i want to add marker to the retrieved location... googleMao.java public class googleMap extends MapActivity{ private MapView mapView; private MapController mc; GeoPoint p; long s; Cursor cur; SQLiteDatabase db; createSqliteHelper csh; String qurry; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); // String qurry=getIntent().getStringExtra("value"); //here is calling the map string qurry s = getIntent().getLongExtra("value",2); map(); mapView = (MapView) findViewById(R.id.mapview1); LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom); View zoomView = mapView.getZoomControls(); zoomLayout.addView(zoomView, new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); //mapView.displayZoomControls(true); mapView.setBuiltInZoomControls(true); mc = mapView.getController(); String coordinates[] = {"1.352566007", "103.78921587"}; double lat = Double.parseDouble(coordinates[0]); double lng = Double.parseDouble(coordinates[1]); Geocoder geoCoder = new Geocoder(this, Locale.getDefault()); try { List<Address> addresses = geoCoder.getFromLocationName(qurry,5); String add = ""; if (addresses.size() > 0) { p = new GeoPoint( (int) (addresses.get(0).getLatitude() * 1E6), (int) (addresses.get(0).getLongitude() * 1E6)); mc.animateTo(p); mapView.invalidate(); mc.setZoom(6); } } catch (IOException e) { e.printStackTrace(); } } @Override protected boolean isRouteDisplayed() { // Required by MapActivity return false; } public void map() { String[] str={"type"}; int[] i={R.id.type}; csh=new createSqliteHelper(this); db=csh.getReadableDatabase(); cur=db.rawQuery("select type from restaurants where _id="+s,null); if(cur.moveToFirst()) { qurry=cur.getString(cur.getColumnIndex("type")); } } }

    Read the article

  • not able to login in ubuntu box with root password

    - by pankaj sharma
    i have ubuntu 10.04 on my sytem, i run command apt-get install csh on the system and try to change the shell by command chsh -s but now the prob is when i try to login the system by ssh i am not able to login by any user account except one and try to change the user su - root it is showing cannot execute c: no such file or directory and look in the /etc/passwd file for root account in shell field C is written in place of /bin/sh help me out to restore the settings

    Read the article

  • The shell dotfile cookbook

    - by Jason Baker
    I constantly hear from other people about how much of the stuff they've used to customize their *nix setup they've shamelessly stolen from other people. So in that spirit, I'd like to start a place to share that stuff here on SO. Here are the rules: DON'T POST YOUR ENTIRE DOTFILE. Instead, just show us the cool stuff. One recipe per answer You may, however, post multiple versions of your recipe in the same answer. For example, you may post a version that works for bash, a version that works for zsh, and a version that works for csh in the same answer. State what shells you know your recipe will work with in the answer. Let's build this cookbook as a team. If you find out that an answer works with other shells other than the one the author posted, edit it in. If you like an idea and rewrite it to work with another shell, edit the modified version in to the original post. Give credit where credit is due. If you got your idea from someone else, give them credit if possible. And for those of you (justifiably) asking "Why do we need another one of these threads?": Most of what I've seen is along the lines of "post your entire dotfile." Personally, I don't want to try to parse through a person's entire dotfile to figure out what I want. I just want to know about all the cool parts of it. It's helpful to have a single dotfile thread. I think most of the stuff that works in bash will work in zsh and it may be adapted to work with csh fairly easily.

    Read the article

  • Problem with .sh file

    - by omgzor
    I don't have any experience writing .sh files. I want to run the pvm2raw utility of this app from the Volume Library. I get the following error when running build.sh in Ubuntu 10.10. build.sh is as follows: # make command set mmfile=V3Makefile set make="make -f $mmfile" set rule=$1 if ($rule == "") set rule="all" // line 16 if ($rule == "deps") then if ($HOSTTYPE == "iris4d") $make MAKEDEPEND="CC -M" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=IRIX depend if ($HOSTTYPE == "i386") $make MAKEDEPEND="c++ -M -I/usr/X11R6/include" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=LINUX depend What's wrong there? Edit: I followed kniwor's advice and installed csh. Now I get the following error: How can I solve this Undefined variable problem?

    Read the article

  • Pie chart of *nix shell use [closed]

    - by hayk.mart
    I've encountered a situation where it would be very helpful to know the breakdown of shell use by percentage. For example, I'm looking for something like bash: X%, sh: Y%, csh, tcsh, zsh, ksh, dash, etc.. Obviously, I know there are several complications - multiple shells, the definition of "use", uncertainty and so forth, but I would like to see an informed answer derived from actual data and based on some stated metric, even if the result could be horribly wrong. Bonus if there is historical data demonstrating a shift in preferences.

    Read the article

  • Unique Features of bash compared to zsh

    - by Tim
    I have been a zsh user for quite some time (before that tcsh and before that csh). I am quite happy with it, but was wondering if there are any compelling features of bash that do not exist in zsh. And conversely, are there zsh features which do not exist in bash. My current feel is that bash is better: If you are familiar with it already and don't want to learn new syntax. It is going to exist on most all *nix machines by default, whereas zsh may be an extra install. Not trying to start a religious battle here, which is why I'm just looking for features which exist in only one of the shells.

    Read the article

  • Where are variables sourced from in bash/redhat?

    - by Derek
    I am getitng something weird in my environment. I have a .bash_profile that only checks for .bashrc and then sources it. I have a JAVA_HOME in that file that is correctly setting the variable and exporting it. However, if I comment out the JAVA_HOME line in .bashrc, another JAVA_HOME is still showing up in my environment, different from the one i was setting in bashrc. Where is this other JAVA_HOME coming from? Thanks As it turns out - it seems like any shell I run is pulling in a JAVA_HOME from somewhere. I dont know what could be making this pull into csh, sh, bash, etc

    Read the article

  • why my server has a dir named "?"

    - by liuxingruo
    These are all the dirs in my server: ? bin boot dev etc home lib lost+found media media2 misc mnt net opt proc root sbin selinux srv sys tmp usr var why there is a "?" dir? Thanks very much. BTW: the touch command was found on my server(wiered). I list the bin dir: alsacard cp dd env hostname loadkeys more ps sed tcptraceroute alsaunmute cpio df ex igawk loadkeys.static mount pwd setfont traceroute6 arch csh dmesg false ipcalc logger mountpoint raw setserial tracert awk cut dnsdomainname fgrep kbd_mode login mv red sh view basename date doexec gawk keyctl ls netstat redhat_lsb_init sleep ypdomainname bash dbus-cleanup-sockets domainname gettext kill mail nice rm sort cat dbus-daemon dumpkeys grep ksh mailx nisdomainname rmdir stty chgrp dbus-monitor echo gtar ksh93 mkdir pgawk rpm su chmod dbus-send ed gunzip link mknod ping rvi sync chown dbus-uuidgen egrep gzip ln mktemp ping6 rview tar touch is missing, how can i get it back?

    Read the article

  • Mass renaming, *nix version

    - by Paolo B.
    I was looking for a way to rename a huge number of similarly-named files, much like this one (a Windows-related question) except that I'm using *nix (Ubuntu and FreeBSD, separately). Just to sum up, while using the shell (Bash, CSH, etc.) how do I mass-rename a number of files such that, for example, the following files: Beethoven - Fur Elise.mp3 Beethoven - Moonlight Sonata.mp3 Beethoven - Ode to Joy.mp3 Beethoven - Rage Over the Lost Penny.mp3 will be renamed like these? Fur Elise.mp3 Moonlight Sonata.mp3 Ode to Joy.mp3 Rage Over the Lost Penny.mp3 The reason I want to do this is that these collection of files will go under a directory named "Beethoven" (i.e. the filenames' prefix), and having this information on the filename itself will be redundant.

    Read the article

  • Why is Internet Explorer treating a file as a web page?

    - by msbg
    I am trying to download a Photoshop shape file (.csh), and instead of downloading it, IE treats it as a webpage and shows a series of symbols. When I try to save it, I am told to either save as an html file or txt file. If I save as txt file and change the extension, Photoshop says it is invalid, since IE saves the text source, not the actual file. I ended up having to use a download program to download it. Why is IE treating it as a webpage, and is there a way to fix the problem? Firefox shows the same issue.

    Read the article

  • JDK8 New Build Infrastructure

    - by kto
    I unintentionally posted this before I verified everything, so once I have verified it all works, I'll updated this post. But this is what should work... Most Interesting Builder in the World: "I don't always build the jdk, but when I do, I prefer The New JDK8 Build Infrastructure. Stay built, my friends." So the new Build Infrastructure changes have been integrated into the jdk8/build forest along side the older Makefiles (newer in makefiles/ and older ones in make/). The default is still the older makefiles. Instructions can be found in the Build-Infra Project User Guide. The Build-Infra project's goal is to create the fastest build possible and correct many of the build issues we have been carrying around for years. I cannot take credit for much of this work, and wish to recognize the people who do so much work on this (and will probably still do more), see the New Build Infrastructure Changeset for a list of these talented and hard working JDK engineers. A big "THANK YOU" from me. Of course, every OS and system is different, and the focus has been on Linux X64 to start, Ubuntu 11.10 X64 in particular. So there are at least a base set of system packages you need. On Ubuntu 11.10 X64, you should run the following after getting into a root permissions situation (e.g. have run "sudo bash"): apt-get install aptitude aptitude update aptitude install mercurial openjdk-7-jdk rpm ssh expect tcsh csh ksh gawk g++ build-essential lesstif2-dev Then get the jdk8/build sources: hg clone http://hg.openjdk.java.net/jdk8/build jdk8-build cd jdk8-build sh ./get_source.sh Then do your build: cd common/makefiles bash ../autoconf/configure make We still have lots to do, but this is a tremendous start. -kto

    Read the article

< Previous Page | 1 2 3  | Next Page >