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

Breaking lines which contains more than 50 characters in a file

Hi, I have a file which contains many lines. Some of them are longer than 50 chars. I want to break those lines but I don't want to break words, e.g. the file Code: This is an exemplary text which...

View Article


Logic for processing 2 arrays

Hi, I need a logic for processing 2 arrays at a same time. x=a,b,c y=d,e now the sequence to be followed is (a,d) , (b,e) , (c,d) , (a,e) , (b,d) , (c,e) and again...(a,d) The sequence should be...

View Article


sed returns error "sed: -e expression #1, char 18: unterminated `s' command"

Hello All, I have something like below Code: LDC100/rel/prod/libinactrl.a LAA2000/rel/prod/libinactrl.a I want to remove till first forward slash that is outputshould be as below Code:...

View Article

[AIX] Binary file warning for text file.

Hello guys, We had to move from a DC to another, and we are now facing an "issue" with some text files. Looks like that some of our log files are set as binary: file TuxConnectorURA.20121012...

View Article

changing which password is prompted for in sudoers

Basically I only want particular users to know the root password, but I also want power users to be able to run certain commands with root privileges. All admins for this box will be authenticating...

View Article


active directory equivalent for unix

At the moment we are integrating LDAP in our environment. Compared to Windows this process is much complicated and time consuming. With Windows you had Active Directory and if you create a new server,...

View Article

Subtracting values from variable

Legends, Please help me in , how do i subtract the variable values listed like below. the first value of orig should be subtracted from first value of prev and so on. Code: san> echo $orig 346 316...

View Article

issues with sql inside if statement

Hi, I have problem with the following code. My IF block is not executed. And I see "syntax error near unexpected token `)'" error for line "EOF" in the stats_function(). but when I comment the IF block...

View Article


Result of Catching Return Value from Sub_script.sh to Main_script.sh is not...

Main_script.sh #! /bin/sh ./Sub_script.sh rc=$? echo "Return code from Sub_script.sh : $rc" if [ $rc -eq 991 ]; thenecho "$rc = 991" echo "" exit 1elif [ $rc -eq 992 ]; thenecho "$rc = 992" echo ""...

View Article


Copy out of File

Hi there, first post I really need advice. Before i managed my prob by reading your threads, very helpful so far! Here is my prob: I want to get an information out of a file with a huge amount of chars...

View Article

Image may be NSFW.
Clik here to view.

How to print first occurence

Hi there, how can i print the first pattern occurrence in a .log file? I want to print the filename of the first 17262? I tried but all I can do is print all the lines with the number 17262? I tried...

View Article

awk number output

Hi, I have a problem when doing calculations in awk. I want to add up a few numbers and output the result. testfile: Code: 48844322.87 7500.00 10577415.87 3601951.41 586877.64 1947813.89 Code: $ awk...

View Article

Read variable name from file and use this?

I would like to read a variable name from file and I would like to use this... e.g. VARIABLE1=XXXXXX File.txt $VARIABLE1 Shell for STRING in `cat File.txt` echo $STRING done I would like the print...

View Article


ordering

file1 Quote: 1 SNP2 3 1 SNP3 3 1 SNP5 4 2 SNP1 4 2 SNP4 4 file2 Quote: SNP1 1 1 1 SNP5 5 5 5 SNP4 4 4 4 SNP2 2 2 2 SNP3 1 1 1 desired output Quote: SNP2 2 2 2 SNP3 3 3 3 SNP5 5 5 5 SNP1 1 1 1 SNP4 4 4...

View Article

Download a site

A buddy of mine was telling me last night that you can write a bash script that will download an entire site in gedit?? Is this true??? I think I am going to fall in love with bash :D Any good...

View Article


Latest firmware version for P770

Dears i have a power7 P770 working in AIX 5.3 TL 11 with frimware AM730_066 is the AM730_066 frimware the latest one or not ?

View Article

String concatenation

Hi, I have two files. Code: cat file.txt a b c d cat file1.txt j k l m I need the output as a:j b:k c:l d:m I tried the script but not working Code: cat test1.sh #!/bin/sh for i in `cat file1` ; do N=0...

View Article


Image may be NSFW.
Clik here to view.

[Solved] Cannot execute file that include files

Iam trying to execute a file that include many files but it seems my main copy.c can't read anyone of them -----------------------------------------------------------------------------------------...

View Article

SUN BLADE T6340 - which OS ?

Hi, I have server SUN BLADE T6340 and i tried install debian sparc on this machine. Will it work ? In the specification is written only Solaris 10.

View Article

Display command

I was given a question that I can't find the answer within my known commands, it is about a file xxx.txt that contains a character string like "Hello!" and its needed to be printed on multiple lines...

View Article
Browsing all 16232 articles
Browse latest View live