scripting

Tag details

Welcome to the 'scripting' tag page at Technorati. This page features content from the farthest reaches of the Blogosphere that authors have "tagged" with 'scripting'.

Look up Offsite Link "scripting" at The Free Dictionary

Latest blogosphere posts tagged “scripting”

  • deleting when nothing is there


    The UNIX and Linux ForumsAuthority Authority: 171
    Hey I know how to use grep to eliminate a row when nothing there is a character that I dont want. But I encountered a problem where there is nothing there. Heres my example: Code: Nam1  Nam2  Year Nam3  Month So for Nam1 there is nothing in the second column so I want to delete it... so anything that ...
    1 hour ago
  • mv command for sub-directories


    The UNIX and Linux ForumsAuthority Authority: 171
    All, am quite new to unix shell scripting. my question is i have like 23 sub-directiries in source area and same 23 sub-directories in destination area. i want to move all the files of 1st sub-dir in source area to 1st sub-dir in destination area and so on till for 23 sub-dirs. i.e. A ...
    1 hour ago
  • manipulating the etc/passwd file with sed


    The UNIX and Linux ForumsAuthority Authority: 171
    How can i use sed to extract the user name and home directory from the /etc/passwd/ file on my server.
    2 hours ago
  • Combination of case and If else in shell script


    The UNIX and Linux ForumsAuthority Authority: 171
    Would it be right forme to combine case statement and if else in one shell script? Would it work?
    2 hours ago
  • lower case to upper case


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi i want to change lower case letters from lower case to upper case for only one particular column. so my file looks like this Code: YU09m  ERTR YU88j    UIOE I want to change it so the letters all on column 1 are upper case Code: YU09M  ERTR YU88J  UIOE thanks:)
    3 hours ago
  • print filenames with spaces using awk


    The UNIX and Linux ForumsAuthority Authority: 171
    Hello all, I want to list the file contents of the directory and number them. I am using la and awk to do it now, #ls |awk {print NR "." $1} 1. alpha 2. beta 3. gamma The problem I have is that some files might also have some spaces in the filenames. #ls alpha beta gamma some file with spaces.txt Now I ...
    4 hours ago
  • keep looking for file and search for a string


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, I need to a program tht will keep looking for that particular file and search for a string, if found kick of a process else exit with condition 1. Pls advice if this can be done by tail cmd or while looop.
    5 hours ago
  • error with the following script


    The UNIX and Linux ForumsAuthority Authority: 171
    Greetings again. I made a program that tells the size of a dictionary and stores it into a temp.txt file. Code: temp="temp.txt" if [ $# -ne 1 ]; then       echo "Wrong parameter"  else       if [ -d "$1" ]; then             rm "$temp"                        #Delete any previous temp ...
    5 hours ago
  • datetime.pm


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, Im trying to use datetime.pm function in Perl . I do not have in the library. Is there a way to get it and put it into library? Thanks, George.
    5 hours ago
  • Reversing a line based on column


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, I have a file that looks like this (tab seperated): Code: read  -  DFHJ read1 -  IOPE read2 + AAAB read3 + MMMN Basically what i want to do is reverse column 3 if column 2 has a - but leave it if its + so the output would look like this: Code: read  -  JHFD read1 -  EPOI read2 + AAAB ...
    5 hours ago
  • Child Process Name


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi , I want to find out the child process name given its PID. I have used the ps command but it displays the parent process name against child PID. Is there any way to find out name of child program executing under any parent program?
    7 hours ago
  • Remove directory with exceptions


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, I want to remove a directory recursively except the inside directories calles .SYNC (designsync dirs) I am looking for something like: \rm -rf The find works ok but I do not know how to redirect it. Please help. Regards, Ziv
    7 hours ago
  • Problems with $?


    The UNIX and Linux ForumsAuthority Authority: 171
    Hello, I have the following piece of code that tries to retrieve the result of a .sh: . $HOME/prueba/Scripts/Recogida/recogida_sedra.sh resultado=$? echo "el resultado es : $resultado" if [ resultado -gt 0 ]; then echo "Se va a preprocesar los archivos" In the code of recogida.sh I have the following : ...
    8 hours ago
  • Shell Script for a newbie


    The UNIX and Linux ForumsAuthority Authority: 171
    Hello all, I want to write a shell script to list the contents of a directory and number them and write them to a file. For example, if I have a directory temp and the contents of the directory are alpha, beta and gamma. I want to write these filenames to a file "test" in a numbered manner. #cd temp #ls alpha ...
    8 hours ago
  • How to clean this script?


    The UNIX and Linux ForumsAuthority Authority: 171
    Hello guys, this script partially works but its still pretty ugly and, moreover, if the month is jan/feb/mar... it doesnt work at all. Could anyone say me how to correct, cut and clean a little bit? Code: #!/usr/bin/ksh [...] egrep -v -e "^\s*#" /file/permission | awk { print $1 } | sort | uniq | while read ...
    9 hours ago
  • print last execution date/time before execution


    nixCraft Linux ForumAuthority Authority: 145
    Hi, Is there any possibility that before i run my script it should print the last execution date/time?? Regards
    9 hours ago
  • remote login and copy files over ssh


    nixCraft Linux ForumAuthority Authority: 145
    Hi, One of my linux machine create somefiles over web. I want a script to copy the same file on remote computer using ssh and scp. when i run PHP Code: prompt >  ssh login @ server1 cd  / path / to / dir / ;  scp filename login @ server2 :/ root / backupdir /  ...
    10 hours ago
  • Obtaining day before a given date


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi all, is there a way using GNU (Solaris 8) methods of obtaining the day before a given day? i.e. 2007-09-09.... I would like the date a day before it so output would be 2007-09-08. Format YYYY-MM-DD I know I can subtract the day number using cut and expr but it would get tricky if the date was 2007-09-01 for ...
    10 hours ago
  • problem with deviding


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi All, I have two variables like below.. Code: ETIMEHR =03            #END TIME HOUR ETIMEMIN=02            #END TIME MIN Now Im converting the min to hour by deviding it by 60 Code: ETIMEMINCONV=`echo "scale=2; $ETIMEMIN/60" | bc` but when i print ETIMEMINCONV instead of getting ...
    10 hours ago
  • Problem with dividing


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi All, I have two variables like below.. Code: ETIMEHR =03            #END TIME HOUR ETIMEMIN=02            #END TIME MIN Now Im converting the min to hour by deviding it by 60 Code: ETIMEMINCONV=`echo "scale=2; $ETIMEMIN/60" | bc` but when i print ETIMEMINCONV instead of getting ...
    10 hours ago

Comments about scripting

Personal attacks are NOT allowed
Please read our comment policy