Search Results

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

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

  • how to souce a csh script in bash to set the enviroment

    - by Daniel
    We have oracle running on Solaris, and the shell is by default CSH. So the login script set the oracle_home,oracle_sid in csh also. But I don't like csh and want to use bash to do my work. So how to source the csh login script in bash? e.g, the following is what in the .cshrc file. And when use bash, I'd like use these variables. One way is to copy the variables again and use bash command, such as export ORACLE_SID=TEST. But doing so will let us to maintain two copy of the files. And when we change the database name, or upgrade the database, I need to maintian the bash login file seperately. It's nice to just use something like source .cshr in bash, but it doesn't work. setenv ORACLE_SID TEST setenv ORACLE_HOME /oracle/TEST/home/products/10204 setenv EPC_DISABLED TRUE setenv MANPATH /usr/local/man:/usr/share/man setenv EDITOR vi setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/usr/sfw/lib/64 setenv NLS_LANG AMERICAN_AMERICA.UTF8 setenv NLS_DATE_FORMAT "DD-MON-RR"

    Read the article

  • replace line with sed in csh

    - by not_a_geek
    Hello, I am trying to change the content of a specific line in a batch of files. I thought that would be a piece of cake but for some reason, nothing happens, so I guess I am missing something. Line 8 should have been replaced. Here the csh script I used: !/bin/csh # replace context in line xxx by yyy 2010/05/07 set files = ls FILENAMEPART* echo $files foreach file ($files) sed '8,8 s/1/2 /' $file end thanks for suggestions

    Read the article

  • How I can Install csh as a non-root user?

    - by user288566
    Hi I need csh for installing a package but I am not root user... I want to install it for my user. I installed csh_20070713.orig.tar.gz, csh_20070713.diff.gz and csh_20070713-2ubuntu1.dsc But there is not dpkg-source command... then I did following procedure: untar *.tar.gz mv csh_20070713.orig csh_20070713 mkdir csh_20070713/debian gunzip csh_20070713.diff.gz patch -p0 < csh_20070713.diff chmod +x csh_20070713/debian/rules but I do not know what should I do next! I used make and make install command in csh_20070713 directory and also debian directory but nothing happened... Plz help me... Thanks

    Read the article

  • How to translate small bash code to csh / tcsh (setting GNOME terminal title)

    - by user1069609
    I need help to translate the following bash code to tcsh : case $TERM in (xterm*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}\007"' ;; esac It is part of my .bashrc on all the machines which have bash as login shell. The code sets the GNOME terminal title to user@somehost (obviously with the real user name and host name). However some hosts have tcsh as login shell, so I need to translate the code into tcsh and add it to the .tcshrc . I considered to somehow source another file with the bash code from inside the .tcshrc file, but I couldn't make it work.

    Read the article

  • Get the last day of the last month in csh?

    - by ANE
    How do you get the last day of the last month in csh? Here is the code so far. The cal command below works if you execute it from the (FreeBSD sh) command line, but I'm having trouble escaping it properly to run within a script. #!/bin/csh set lastdayoflastmonth=`cal `date '+%m'` `date '+%Y'` | grep . | fmt -1 | tail -1` echo $lastdayoflastmonth

    Read the article

  • How to run a process and completely detach it of its parent shell

    - by Bicou
    I'm running a program on a linux server that will take days to complete. I'm launching it from my workstation from an SSH terminal, as this program is command-line only. I want to be able to do all of these : launch that program, redirect standard outputs to files, exit my SSH session without making this terminate the process. I thought about $ ./MyProg.csh -params -foo -bar </dev/null 1>~/out.log 2>~/err.log & However, the process is terminated the moment I close my SSH session. My workstation is running Windows XP, and I cannot guarantee its uptime over several days, which is required for the processing of my data on the Linux server. As you may have noted, my program requires to be launched from CSH. Is it possible to do this ? Thanks.

    Read the article

  • How to use parallel execution in a shell script?

    - by eSKay
    I have a C shell script that does something like this: #!/bin/csh gcc example.c -o ex gcc combine.c -o combine ex file1 r1 <-- 1 ex file2 r2 <-- 2 ex file3 r3 <-- 3 #... many more like the above combine r1 r2 r3 final \rm r1 r2 r3 Is there some way I can make lines 1, 2 and 3 run in parallel instead of one after the another?

    Read the article

  • redirection of awk print to a file

    - by sushil kumar
    I can get the cpu Mhz of a solaris machine by following command. % /usr/sbin/psrinfo -v | grep operate |head -1 | awk '{print $6}' 1200 when I run the following command, awk output is not getting redirected. % csh -cf "/usr/sbin/psrinfo -v | grep operate |head -1 | awk '{print $6}' > myoutput" % cat myoutput The sparcv9 processor operates at 1200 MHz, how to get following result % cat myoutput 1200

    Read the article

  • Running "source" from python

    - by R S
    Hello, I have a file a.txt with lines of commands I want to run, say: echo 1 echo 2 echo 3 If I was on csh (unix), I would have done source a.txt and it would run. From python I want to run os.execl with it, however I get: >>> os.execl("source", "a.txt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/os.py", line 322, in execl execv(file, args) OSError: [Errno 2] No such file or directory How to do it?

    Read the article

  • tcsh `cd` always issues a printout of `$PWD`. How do I disable this?

    - by Ross Rogers
    Someone in IT thought it would be a good idea to modify the default behavior of the command cd in our tcsh environment. As of Monday the "upgraded" version of cd always prints out $PWD after it navigates to the new directory. e.g. % cd ~/ Directory: /nfs/pdx/home/rbroger1 which cd yields no results so it isn't being alias'd. Is there some environment variable or normal tcsh variable that is being set in our setup scripts to produce this output? I don't want to change all my scripts to use a wrappered or alias'd cd. I just want plain ol' cd.

    Read the article

  • linux text editor for windows

    - by lego 69
    hello, can somebody recommend me good Linux text editor for Windows (if it exists), I wrote scripts for C-Shell using txt editor of windows but I have problem, it doesn't run cause windows is not UNIX, what can I do? I don't want to install linux for a few scripts, I do testing of my scripts via unix server (this server is not mine), thanks in advance

    Read the article

  • how do i set c-shell environment variables in tcsh shell script

    - by rambokayambo
    i am trying to set the environment variables in tcsh shell and it is not working. This is the syntax that i am using currently setenv MYSQL_HOME=/opt/mysql/mysql/bin my other question is i have a c-shell script that i am editing. Is setenv the same as a regular set MYSQL=${MYSQL_HOME}/bin/sqlplus? set MYSQL_HOME=/opt/mysql/mysql/bin or should i just set the MYSQL_HOME to where the mysql executable is ?

    Read the article

  • Grep expression with special file names

    - by user2919185
    i am a real beginner in csh/tcsh scripting and that's why i need your help. The problem is I have to go through some regular files in directories and find those files, that have their own name in its content. In the following piece of script is cycle in which I am going through paths and using grep to find the file's name in its content. What is surely correct is $something:q - is array of paths where i have to find files. The next variable is name in which is only name of current file. for example: /home/computer/text.txt (paths) and: text.txt (name) And my biggest problem is to find names of files in their content. It's quite difficult for me to write correct grep for this, cause the names of files and directories that i am passing through are mad. Here are some of them: /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/!_1 /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/dam/$user/:e/'/-r /home/OS/pocitacove/testovaci_adresar/z/test3/skusime/ taketo/ taketo /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/.a=b /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/@ /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/: /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/'ano' foreach paths ($something:q) set name = "$paths:t" @ number = (`grep -Ec "$name" "$paths"`) if ($number != 0) then echo -n "$paths " echo $number endif @ number = 0 end

    Read the article

  • unknown error in shell

    - by lego69
    can somebody explain me what does this error mean: > ./rank lines.in 'nknown option: `- Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ]. this is my script rank: #! /bin/tcsh -f set line = `cat ${1}` echo $line I think that the problem I have is with first row #! /bin/tcsh -f I'm working on Windows! but after I wrote script on windows editor, I converted it using dos2unix rank, what can be the problem, thanks in advance for any help

    Read the article

  • scripts on Cshell

    - by lego69
    hello, I've got some problem, I have list of data in the file: 053-37878 03828008 Moskovitch James 500 052-34363 01234567 Mendelson Kippi 450 053-32322 03828008 Jameson Shula 350 054-39238 03333333 Merden Moshe 300 is it possible rewrite this list in the same file (without using temporary file) but without last number thanks in advance for any help (I'm talking about C-Shell scripts)

    Read the article

  • how does pipe work

    - by lego69
    hello, explain me please how exactly pipe works, for example I have this snippet of the code set line = ($<) while(${#line} != 0) if(${#line} == 5) then echo line | sort | ./calculate ${1} endif set line = ($<) end I need to choose all rows with 5 words and after sort it and after transfer, but I'm confused, how will it work, first of all 'while' will take all information and after that transfer it to sort, or every iteration 'while' will do sort? thanks in advance

    Read the article

  • strange behavior

    - by lego69
    I wrote simple script test echo hello <-- inside test if I press one time enter after hello, my script will run, if I don't press - it will not, if two times I'll receive my hello and + command was not found, can somebody please explain me this behavior thanks in advance

    Read the article

  • Getting ssh to execute a command in the background on target machine

    - by dagorym
    This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return? When I try to just include the ampersand (&) at the end of the command it just hangs. The exact form of the command looks like this: ssh user@target "cd /some/directory; program-to-execute &" Any ideas? One thing to note is that logins to the the target machine always produce a text banner and I have ssh keys set up so no password is required.

    Read the article

  • How to run a shell command and selectively ignore the status?

    - by Walter Nissen
    I've got a shell script that I would like to stop with an error on nonzero status most of the time, but in some cases I want to ignore it. For example: #!/bin/tcsh -vxef cp file/that/might/not/exist . #Want to ignore this status cp file/that/might/not/exist . ; echo "this doesn't work" cp file/that/must/exist . #Want to stop if this status is nonzero

    Read the article

  • problems with cut (unix)

    - by lego69
    hello everybody, I've got strange problem with cut I wrote script, there I have row: ... | cut -d" " -f3,4 >! out cut recieves this data (I checked it with echo) James James 033333333 0 0.00 but I recieve empty lines in out, can somebody explain why?

    Read the article

  • how to read rows?

    - by lego69
    I'm trying to read first row from the file > source ./rank file using this script set line = ($<) but when I enter echo $line I receive nothing, how can I change it? thanks in advance

    Read the article

1 2 3  | Next Page >