hey guys..
probably a simple question but i cant seem to find any info on it.
i have a small array of strings, and i want to concatenate the contents of the array into one big string.
any ideas on how i can do this?
cheers. (2 Replies)
I m new to shell scripting and what i want is take as an i/p from command line the name of the file and inside my script i should redirect the o/p of my few commands to this file concatenated with .txt
for example if i give
./linux filename
i should get the o/p in filename.txt
i need to... (2 Replies)
Hi Friends,
I'm new to shell scripting and trying to concatenate two Strings to create a filepath like string but I'm getting an unexpected result.
here is my code for 'runToneUserLoad.sh':
script_dir="$(dirname $0)"
echo "Script Dir:$script_dir"
dirtest1="/installedUtility"... (6 Replies)
Hi, all,
I tried to write a simple shell script as follow:
#!/bin/bash
# What want to do in bash is following
# : pcd_viewer cloud_cluster_0.pcd cloud_cluster_1.pcd cloud_cluster_2.pcd cloud_cluster_3.pcd cloud_cluster_4.pcd
STR = "pcd_viewer"
for i in `seq 0 4`
do
STR... (1 Reply)
hi I am on AIX 5 and i have a script that runs the following command to list processes running. I then want to kill the returned processes. The PID are on field 2 separated by spaces.
$ ps -ef|grep "rams.e $PORT"
lesqa 1826998 2646248 0 11:20:35 pts/2 0:00 grep rams.e
t24cm 2789380 ... (3 Replies)
Hi All,
I have written a C program to solve this problem but I am eager to know whether the same output can be obtained using sed or awk?
This is the input:
star
ferry
computer
symbol
prime
time
This is the output:
starferry
ferrycomputer
computersymbol
symbolprime
primetime (7 Replies)
Hi
I'm trying to loop through an array that contains other arrays and these arrays consist of strings with spaces. The problem is that I can't seem to preserve the spacing in the string. The string with spaces are either divided into multiple items if I change IFS to \n or all the elements of... (4 Replies)
Alright, so I'm writing a file for the lexical analyzer (lex). It will be used to check C code (collecting the identifiers and storing those names along with the line numbers the identifier was found on). I'm not used to 'C' so I'm having some difficulty.
I am using a function (insertId()) to... (4 Replies)
Hello All Unix Users,
I am still new to Unix, however I am eager to learn it..
I have 2 files, some lines have some matching substrings, I would like to concatenate these lines into one lines, leaving other untouched. Here below is an example for that..
File 1 (fasta file):
>292183... (6 Replies)
Discussion started by: Mohamed EL Hadi
6 Replies
LEARN ABOUT MOJAVE
string
STRING(3) BSD Library Functions Manual STRING(3)NAME
index, rindex, stpcpy, strcasecmp, strcat, strchr, strcmp, strcpy, strcspn, strerror, strlen, strncasecmp, strncat, strncmp, strncpy,
strpbrk, strrchr, strsep, strspn, strstr, strtok -- string specific functions
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <strings.h>
char *
index(const char *s, int c);
char *
rindex(const char *s, int c);
int
strcasecmp(const char *s1, const char *s2);
int
strncasecmp(const char *s1, const char *s2, size_t n);
#include <string.h>
char *
stpcpy(char *dst, const char *src);
char *
strcat(char *restrict s1, const char *restrict s2);
char *
strchr(const char *s, int c);
int
strcmp(const char *s1, const char *s2);
char *
strcpy(char *restrict s1, const char *restrict s2);
size_t
strcspn(const char *s1, const char *s2);
char *
strerror(int errnum);
size_t
strlen(const char *s);
char *
strncat(char *restrict s1, const char *restrict s2, size_t n);
int
strncmp(const char *s1, const char *s2, size_t n);
char *
strncpy(char *restrict s1, const char *restrict s2, size_t n);
char *
strpbrk(const char *s1, const char *s2);
char *
strrchr(const char *s, int c);
char *
strsep(char **stringp, const char *delim);
size_t
strspn(const char *s1, const char *s2);
char *
strstr(const char *s1, const char *s2);
char *
strtok(char *restrict s1, const char *restrict s2);
DESCRIPTION
The string functions manipulate strings that are terminated by a null byte.
See the specific manual pages for more information. For manipulating variable length generic objects as byte strings (without the null byte
check), see bstring(3).
Except as noted in their specific manual pages, the string functions do not test the destination for size limitations.
SEE ALSO bstring(3), index(3), rindex(3), stpcpy(3), strcasecmp(3), strcat(3), strchr(3), strcmp(3), strcpy(3), strcspn(3), strerror(3), strlen(3),
strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3)STANDARDS
The strcat(), strncat(), strchr(), strrchr(), strcmp(), strncmp(), strcpy(), strncpy(), strerror(), strlen(), strpbrk(), strspn(), strcspn(),
strstr(), and strtok() functions conform to ISO/IEC 9899:1990 (``ISO C90'').
BSD December 11, 1993 BSD