Search Results

Search: Posts Made By: khchong
1,608
Posted By Don Cragun
You still haven't told us what operating system...
You still haven't told us what operating system you're using.

Note that numeric is 0 through 9; not 1 through 9.

Note that awk and sed are perfectly capable of reading a file by itself without...
991
Posted By Scrutinizer
Note: -d '' will only work with GNU paste
Note: -d '' will only work with GNU paste
991
Posted By Akshay Hegde
Try also $ sed ':a;N;$!ba;s/\n//g' file ...
Try also

$ sed ':a;N;$!ba;s/\n//g' file

---------- Post updated at 02:07 PM ---------- Previous update was at 02:04 PM ----------

paste -sd '' file

---------- Post updated at 02:08 PM...
991
Posted By Scrutinizer
This will leave the newline in place after the...
This will leave the newline in place after the last line
paste -sd '\0' testcode.txt
991
Posted By chacko193
Or try: awk '{ORS=""}1'...
Or try:

awk '{ORS=""}1' testcode.txt
991
Posted By Don Cragun
Try: tr -d '\n' < testcode.txt;echo
Try:
tr -d '\n' < testcode.txt;echo
1,846
Posted By RudiC
Try ls | sort -k1.7n
Try ls | sort -k1.7n
12,850
Posted By ddreggors
Since the OP was asking about exit status's in...
Since the OP was asking about exit status's in regards to child processes... I thought I would add this.


Consider two shell scripts, parent and child:

PARENT (test-parent.sh):

#!/bin/sh
...
2,294
Posted By hergp
#!/bin/ksh actual=$(<filetest.log) ...
#!/bin/ksh

actual=$(<filetest.log)
expected="PASS
PASS
PASS"

if [[ $actual == $expected ]]
then
print all fine
exit 0
else
print bad bad bad...
exit 1
fi
1,733
Posted By vgersh99
nawk '{if (gsub(/[^A-Z]/, "")){s++;exit}}END{exit...
nawk '{if (gsub(/[^A-Z]/, "")){s++;exit}}END{exit s}' myFile;echo $?
1,733
Posted By vgersh99
try awk instead
try awk instead
1,733
Posted By vgersh99
nawk '{if (gsub(/[^A-Z]/, "")){s++;exit}}END{exit...
nawk '{if (gsub(/[^A-Z]/, "")){s++;exit}}END{exit ++s}' myFile;echo $?
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 09:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy