File not found when using cygwin
Code: files="UserRightAssignment.txt" echo $files echo '1.1.1.2.2.1;' `grep -ai '^Modify an object label' $files` Hi there, I got such an output when using unix,please advise Code: 1.1.1.2.2.1;...
View ArticleFailed to su to user
I am unable to su to functional user, though changed the soft-hard limit for open files in limits.conf. The following command did not help. Code: ulimit -n <value> While su to user, the error I...
View ArticleDisplay the file name on each line using awk
How do I display the filename that has been awk to each of the line in Unix, i need to so far I have tried {print FILENAME;nextfile} but to no avail. Code: `awk -F, '/1.2 Install TCP Wrappers/ {P=0}...
View ArticleNeed help in scripting
Hi, We have a requirement,client will post the file into ftp server with name as "prior-product-purchaseproductpurchase001_20150608.txt".One copy should be in this FTP server. After that we need to...
View ArticleCheck for decimal point and add it at the end if its not there using awk/perl
I have test.dat file with values given below: Code: 20150202,abc,,,,3625.300000,,,,,-5,,,,,,,,,,,,,,,,,,,,,, 20150202,def,,,,32.585,,,,,0,,,,,,,,,,,,,,,,,,,,,,...
View ArticleRemoving last character of a specific line from a file
Hello guys, I would need to remove the last character ")" of a specific line. This can be from any line. Your help is appreciated. Below is the line. Code:...
View ArticleMigrating an HPUX 11.11 server to HDS SAN
Dear all, I have been baby-sitting a pair of HP servers connected to it's own dedicated SAN. That's just how we inherited it :o Anyway, I've been asked to see if we can replace the SAN with space being...
View ArticleCopy/paste in vi editor
Hello guys, I am trying to copy a line in vi editor and paste it with below commands but paste command is not working and instead of paste action prints the p character!! I should also mention that the...
View ArticleScript for Deleting a process which exist every day in hold state
Hi All , There always exist one process in hold state every day which will cause savior impact if i didn't kill it. i will do it manually . Manul process is this. Code: sudo -iu...
View ArticleCombine two lists of variables
Thanks in advance for any advice and help. I have two lists of variables that I want to put into nested for loops. Code: for x in 1 2 3 do for y in a b c do The output I want is: Code: filepath/1/...
View ArticleCommand Line Perl for parsing fasta file
I would like to take a fasta file formated like Code: >0001 agttcgaggtcagaatt >0002 agttcgag >0003 ggtaacctga and use command line perl to move the all sample gt 8 in length to a new file. the...
View ArticleRemove space before numbers in delimited file
Hi, I have a file which looks like this Code: FORD|1333-1| 10000100010203| 100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987 I need the output to look like this Code:...
View ArticleReplacing nth field with nth_text for each line in a file
Hi All, I am very new to shell scripting and tried to search this in the forum but no luck. Requirment: I have an input file which is comma separated. I need to replace the value in 4th column with...
View ArticleSyntax error in awk
I know the below code worked, but the syntax appears to be wrong and I can not seem to correct it. Thank you :). Code: awk 'FNR==NR {E[$1]; next }>$3 in E {print $3, $5}' medical_exome__genes.txt...
View ArticleTexInfo, word formatting?
Heyas While thinking how to rewrite my docs, figured i might want to make it GNU, so i started with TexInfo. It took a while to figure about @sections, and such, but the main gaol is to get a...
View ArticleAttach multiple index.html file using mutt
Hi I want to attach multiple index.html, index_v2 file using mutt command basically i want first index.html and then index_v2.html file as a body in email , these html files are test reports I am using...
View ArticleArchiving files using shell script
Dear Team, I am looking for transferring files to and from the local and remote servers using SFTP commands. Currently the script is using the mget and mput commands to do the copying of the files....
View ArticleProblem with blanks, shifting the row when using awk
Hello, I have files with fixed length fields. Code: 12345 12345 12345671234567 10 1234567 12345 12345 123456 1234567 10 1234567 I want to take 1st, 3rd, 4th and 6th string....
View ArticleSwitching the version of java used
Hello, I'm trying to run a program that needs java 7, but java 6 is in the default folder and I don't have permission to change the /usr/bin/java folder and change the version. I have java 7 downloaded...
View ArticleSwapping the 1st 4 lines only
How can you swap the first 4 line only, the rest will stay the same. thanks Code: #!/bin/sh line=4 awk -v var="$line" 'NR==var { s=$0 getline;s=$0"\n"s getline;print;print s next }1' fileko.tx...
View Article