Which system calls to move data on a device with mounted partitions?
I need to be able to move data around a disk that has mounted partitions. I am not touching the data on the mounted partition, the MBR or any other disk metadata, only the freespace and unmounted...
View ArticleRunning a program multiple times to search pattern and assign structure
Hi all, I have a big file (n.txt) with following pattern: Code: ATOM 1 N SER A 1 122.392 152.261 138.190 1.00 0.00 N ATOM 2 CA SER A 1 122.726 151.241 139.183 1.00 0.00...
View ArticleChmod list of files
Hi, I have a list of files in a text file. I want to change the mode of every one of those files, but am having difficulty in doing so. Code: #!/bin/bash files=/home/david/files.txt for $item in $files...
View ArticleProblem after changing email address
Hi, I updated my email address and since then I am not able to post in any other area than here, see the adds and am not able to edit my profile in the User CP. After saving the password change the...
View ArticleNeed help with using a script variable in awk
Hi All, Please help me with a issue in below code Code: head -1 sample.txt > header.txt field_count=`head -1 sample.txt | tr -dc '\t' | wc -c` field_count=`expr $field_count + 1` i=1 while [ $i -lt...
View ArticleOutput when killing a background process
I played a bit around with the Terminal and I observed something. When I start and kill a background process, there is some kind of output. After I invoked the command to start the process the first...
View ArticleScripting help with Sudoers file
Hello, Recently our team noticed access to groups had not been revoked per sudo file. We currently have around 160 AIX LPARS. I am hoping someone can help me write a script that would copy all sudoers...
View Articleawk Help: quick and easy question may be: How to use &&
Hi Guru's. I am trying to use to check if $5 is greater than 80 & if not 100, then to print $0 : Code: awk '{ if ($5>80) && if ($5 != 100) print $0} But getting error: Code: >bdf1|sed...
View ArticleShell script to put delimiter for a no delimiter variable length text file
Hi, I have a No Delimiter variable length text file with following schema - Code: Column Name Data length Firstname 5 Lastname 5 age 3 phoneno1 10...
View ArticleFind duplicates in column 1 and merge their lines (awk?)
Hi, I have a file (sorted by sort) with 8 tab delimited columns. The first column contains duplicated fields and I need to merge all these identical lines. My input file: Code: comp100002 aaa...
View ArticleUnderstanding an iostat entry
Hi all, I'm working on a solaris server. there are no any hardware issue. but I get the following isostat output: Code: # iostat -en ---- errors --- s/w h/w trn tot device 0 0 0 0...
View ArticleXML tag name content replacement
Hi, Need to replace an XML tag name contents, please provide any suggestions. Scenario is : Code: <abc_def>Value_some_content</abc_def> Expected output : Code:...
View ArticleWeird: unexpected result after piping a sort
Hello, And when you think you know the basics of something, UNIX in this case, something like what I will describe below comes along.... On a Linux system, a "typical" directory with some files. Say...
View ArticleOs Open source dialer not working on Centos Asterisk platform
Hi We have one centos Server on Asterisk platform and using OS Open source dialer for dialing outbound connections.We are using eyebeam as a softphone for calling with Server ip 192.168.1.X.Today i...
View ArticleScript to add backslashes to end of certain lines of text
I'd like to write up notes in a relatively readable format and then use a shell script to add LaTeX formatting. Specifically, I'm trying to figure out how to add the LaTeX newline character (\\) to the...
View ArticleSort 3 or more columns in a HTML file
Hi Friends, I have a HTMl file with 10 columns. I found a script online that can sort any single column in a HTML file. But, I would like to sort on multiple columns at once. Could you please show some...
View ArticleSolaris 2.5.1
Hello. Does anyone have a Solaris 2.5.1 or at least 2.6 for x86? Yes, exactly for x86... It is needed to test software before deploying under SPARC. I would be very grateful)
View ArticleDeleting the lines exist between the Mattched Patterns
Hi, I have a file with the content: Code: for name in \ sree\ rama\ laila\ srihari\ vicky\ john do echo $name done I need to remove all the name lines that exist between for (first line) and do line...
View ArticleMatch on columns and replace other columns
Hi Friends, I have the following input file Code: cat input chr1 100 200 0.1 0.2 na 1 na nd chr1 105 200 0.1 0.2 1 1 na 98 chr1 110 290 nf 1 na nd na 1 chr2 130 150 12 3 na 1 na 1 chr3 450 600 nf nf na...
View ArticleNeed Some Advice - Best Distro For My System
Hey guys, this is my first time posting here (although I've been reading the forums for a while now). I'm looking for a good UNIX (or UNIX based/UNIX-like) distro to install on an old Dell Dimension...
View Article