Add extra column in csv file
Hi guys, Can you please help me with the unix command (awk) or script to add one column at the end (as number of column in a file are not fixed) in a csv file, and the value of that column will be...
View ArticlePerl regexp help
Hi, I have file like below: Code: 1|1212|34353|5fdf 6575||dfgdg sfsdf |afsf||4|aasfbc|~1213~~~~~ 1|1212|34353|5fdf 6575||dfgdg sfsdf |affsf| |4|abc|~rwarw~~asa~~~123~312313 1|1212|34353|5fdf...
View ArticleNavigating directories with * / . and ..
I would be very happy (after a lot of fruitless searching) if someone could explain the meaning of these variations on the ls command: ls */ ls */. ls */./ I understand the basic use of ls already eg...
View ArticleHelp with vi editor
Hi, In vi editor for search and replace , I used to use :%s/'thing-to-be-searched'/'replace-thing'/. Now i came across this line :%s/^/##hello#/ Can someone help me decipher this line. Thanks in...
View ArticleTable look up using awk or any other means
Hi all, I wanted to do a lookup table method using awk or any other commands. I would really appreciate any help on this. my sample input and desired outputs are given below. file1.txt is my...
View ArticleScript used to create another script
Hi guys . I want to create a script for POST INSTALLATION for new machines being deployed in my Data Center. I want to create a script post_install.sh that further creates a new script(s) that are...
View ArticleFind and replace mulitple charaters in filenames
I have a virtual pdf printer set up on my server which produces files with the following prefix: Code: smbprn_00000044_Microsoft_Word_-_OriginalFilename.pdf the number in the center of the file...
View ArticleSound not working in laptop model Lenovo T430
Hi I have a new TP installed with RHEL 6.0, sound not working in this. I tried to upgrade the kernel to 2.6.32-279.el6.i686 and also 2.6.32-279.19.1.el6.i686 but getting kernel panic with these...
View ArticleSorting on length with identification of number of characters
Hello, I am writing an open-source stemmer in Java for Indic languages which admit a large number of suffixes. The Java stemmer requires that each suffix string be sorted as per its length and that all...
View ArticleScript to move files in multiple folders
Hello all, I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders)....
View ArticleMoving a zone path to a new file system
Hello Gurus, I need your help with this please. I am trying to move a zone to a new directory but it keeps failing. Below is what I did and the message I get. Your help will be appreciated. Thanks...
View ArticlePlease help on "if" statement.
Hi, I want to filter the logs per domain and place it in a single text file, but I'm having a problem with "if" statement because current archiving setup where logs are compressed into two different...
View ArticleSummary report csv file
Hello, I have 2 csv files with 4 columns each. file1.csv A, AA, AAA, AAAA B, BB, BBB, BBBB file2.csv C, CC, CCC, CCCC D, DD, DDD, DDDD I would like to use shell commands (sed, awk...) to copy the...
View ArticleUsing "at" command
how can i execute a script at the same time everyday using "at" ??? for example if i wan to run the script "tims.sh" everyday at 6:00 am what will be the command??
View ArticleDate increment logic
Hi all, I need to increment date at run time. Example: I need to write a shell script with two parameters. 1. country code like (US,UK, IND.....) 2. Date range from_date to to_date (20070101 to...
View ArticleSignificance of ':-' while accessing a variable
Hi I was trying to understand what ':-' means when used with variables Code: echo ${x:-10} if [ "${OSH_compileFlag:-}" = "1" ] Thanks
View ArticleBash to ksh problem
Hi all Below code works in bash but it is not working in ksh. Code: #!/bin/bash #give start date and enddate in the format yyyy_mm_dd startdate="${1//_/-}" # change underscores into dashes...
View ArticleSoftware Suite Structure
E have the following directory structure for my programs executables are put in bin, object files in obj There is a makefile .mk for each program. I would need to have another makefile to build...
View ArticlePlease help translating this to shell
Hello Im new here, I just got my first VPS and I really need help converting this .bat to shell script so i can run my program. Code: @echo off @title DiamondMS v117 set CLASSPATH=.;dist\* java -client...
View Articleawk Arrays
So I'm back once again beating my head off a wall trying to figure out how to get this to work. My end goal is to take input such as what's below, which will be capture in real time with a tail -f from...
View Article