Quantcast
Channel: UNIX and Linux Forums
Browsing all 16232 articles
Browse latest View live
↧

cant figure out the error in this script (adding numbers in a string) using...

hii please help me this is the script Code: num=$1 sum=0 while [$num -ne 0] do x=`expr $num % 10` sum=`expr $sum + $x` num=`expr $num / 10` done echo "Summation is $sum" it is giving error...

View Article


Extracting rows from a text file based on the values of two columns (given...

Hi, I have a tab delimited text file with multiple columns. The second and third columns include numbers that have not been sorted. I want to extract rows where the second column includes a value...

View Article


Trouble with pipes in chat client on linux

I'm writing a simple chat client in C++ on linux to connect to a win32 chat server on my computer also written in C++. I'm confident that the server works but the chat client is giving me some trouble....

View Article

Script to create folder, copy file, and send email on success

I am very new to UNIX as well as scripting so please be gentle, haha. I have a Linux client which has a mount point mapped to my /etc folder on a NetApp FAS system. I woudl like to be able to copy the...

View Article

Deleting row if all column values are a particular string

Hello, I have a very large file for which I would like to remove all rows for which the value of columns 2-5 is zero. For instance I would like this file: contig1, 0, 0, 0, 0 contig2, 1, 3, 5, 0...

View Article


Bash script - $(ls expr) return double file name with one finishing with '.'

Hello. This small part of my script Code: #!/bin/bash SRCDIR=/root/.kde4/share/config for MY_FILE in  $(ls $SRCDIR/kate*) ; do     echo "$MY_FILE" done give : Quote:...

View Article

adding file extensions to split output files

Hello, I've searched this forum and others for a solution to my problem but nothing seems just right, I'm hoping I can get some help (seems like this should be easy, and I apologize if I've missed...

View Article

pmrun command

Hi, Can somebody tell me the purpose of using 'pmrun' command in unix box. The command is like below pmrun -h <servername> su - Thank you

View Article


Sparc Assembly

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am having a hard...

View Article


two-way piping values between parent and child

Hello everyone. I'm pretty new to the topic of fork(), pipe() etc. All day I've been trying to make my code execute but it doesn't seem to be working the way I understand it. :wall: Anyway, my task is:...

View Article

Trouble with Iterators and Hashtables (Java)

Okay so I am currently workng on an assignment where I have basically got to create a word ladder, eg. Click, Clock, Flock, Flick, so its a list of words with only 1 letter difference, and the same...

View Article

Sed print range of lines between line number and pattern

Hi, I have a file as below This is the line one This is the line two <\XMLTAG> This is the line three This is the line four <\XMLTAG> Output of the SED command need to be as below. This is...

View Article

Filename collision during backup

Hi, I am trying to backup all *.tar files from a legacy Linux to a portable harddrive. find . -name "*.tar" -exec cp {} /media/mypassport/backup \; I found that there are files with the same filenames...

View Article


Using paste command every nth number of file

Hi, I want to use paste command in a loop that does it every 6 files. My sample files are like the ones below. Code: 20010101.txt 20010106.txt 20010111.txt 20010116.txt 20010121.txt 20010126.txt...

View Article

Monitor issues Invalid Format

Hello Folks, Monitor took a crap on me so I bought a new flat screen. Im running Ubuntu 12 recieving an invalid format after the GUI login screen. How do I go about trying to change the resolution. FYI...

View Article


Image may be NSFW.
Clik here to view.

Need urgent help with korn shell script

Hi All, Need urgent help with korn shell script, which monitors AIX WPARs Status. Basically WPARs run on a LPAR, So there is a Command "lswpar" which displays WPARs status. This script should be...

View Article

need a perl script similiar to grep -r 'word' /path/to/dir"

Hi , i am looking for a perl script to grep for a string in all files inside a directory . bash command . grep -r 'word' /path/to/dir Thanks, Nvil

View Article


Zip a directory based on its age

I had allot of help with the below script, and its been a long time since i've done anything with shell scripts so I am having some trouble. I am trying to zip the trace folder after it is copied and...

View Article

Image may be NSFW.
Clik here to view.

perl code to grep a particular coulumn in CSV format

Hi I want to grep a column 6 & column 7 from a CSV Format file & then i have to find the difference between these columns as these both columns contains date & time in 7/7/2012 9:20 this...

View Article

How to check the Files in GB ?

Hi, Can anybody give me the command in AIX to check the file sizes in GB instead of MB or KB ? Regards, Aparna.

View Article
Browsing all 16232 articles
Browse latest View live